microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.31k stars 28.58k forks source link

[Accessibility] Do not use title attribute when labeling buttons #175282

Open jooyoungseo opened 1 year ago

jooyoungseo commented 1 year ago

CC @meganrogge

The following is just one of the examples. If there are any other buttons using title attribute for providing text labels. Please either replace them with or additionally use aria-label.

Reproducible Steps

  1. Load JAWS screen reader.

  2. Press Ctrl+Shift+F

  3. Tab to find Use Regular Expression

  4. Tab again to land in "Toggle Search Details" expandable button.

Current Issues

Some screen readers, such as JAWS, do not recognize the "Toggle Search Details" button. It just says "button."

Solutions

Avoid using title atribute to label this button. Instead, use aria-label.

System Info

Version: 1.76.0-insider (system setup) Commit: d0acdbff1f30eac7cc68930013485276d1bae0ec Date: 2023-02-23T05:23:26.617Z Electron: 19.1.10 Chromium: 102.0.5005.196 Node.js: 16.14.2 V8: 10.2.154.26-electron.0 OS: Windows_NT x64 10.0.22621 Sandboxed: Yes

meganrogge commented 1 year ago

fyi @isidorn I think this would be a good team-wide initiative

isidorn commented 1 year ago

@jooyoungseo thank you for this suggestion. But the problem is that if we use aria-label and title some screen readers will double read. And we have to use title so sighted users get a hover. So I think the problem here is in JAWS, since all other screen readers are behaving as expected. JAWS should respect the title when announcing content.

@meganrogge in case we decide to do this, I believe a strategic change in the ActionBar would apply it everywhere. For example somewhere here: https://github.com/microsoft/vscode/blob/b5a4806a03c4e257fe5fa26423bf2b6dc26450b9/src/vs/base/browser/ui/actionbar/actionViewItems.ts#L221

jooyoungseo commented 1 year ago

@isidorn Yes, indeed. I think this is something that we need to talk with JAWS developers. We can reach out to them via support@FreedomScientific.com. I can also report this as one of JAWS users, but communicating between Microsoft and Freedom Scientific might be more effective in the long run.

isidorn commented 1 year ago

@jooyoungseo it would be great if you report this as the user and add me in the cc. Would that work?

jooyoungseo commented 1 year ago

@ggordon-vispero -- It would be appreciated if you could take a look at this issue and address this on JAWS end.