New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tabs should use 'tab' role for better screen reader support #93789
Comments
@joanmarie thanks for filling this issue. However we do not use the role @joanmarie This week we are wrapping up our milestone, and I would love to change this start of next milestone to get feedback from insiders in case we break something. In case you want to try it out right now, just change the role on the second code pointer. Also let us know if you have tips with regards to the close button - how to make sure it is being read even if we use the 'tab' role. And yes we should update the |
@isidorn: Devil's advocate question for you: Is it really needed -- or even desired -- for screen readers to read that there is a close button there? Many page tabs in native apps include a close button, the presence of which is not announced by screen readers (AFAIK). These close buttons are typically not focusable. And even if it were, navigating up to the page tab via keyboard would be tedious. So screen readers announcing the existence of a tedious-to-access widget strikes me as unwanted chattiness. Plus, Ctrl+W is typically assigned to perform the close operation in all of these apps. And most screen reader users know this. All of that said, if you want to add it, perhaps you could add information to the accessible description of the tab. Orca -- and I believe other screen readers -- tack on the accessible description at the end of the widget presentation and make description presentation optional. Thus it is easy to interrupt or disable for users who find it too chatty. Accessible descriptions can be added via |
That was super helpful. Thanks!! Making that change causes the missing events to be emitted. I will need to make one change in Orca to cause that to be presented which I'll do shortly -- after investigating some chattiness that's resulting from Orca now presenting the page tab changes. |
@isidorn: Here is a screen shot from Accerciser (Linux accessibility inspector). It shows what is exposed when I changed the role of the page tab from In particular it shows:
As I mentioned above:
By default, Orca presents the description. Therefore, what Orca master will say for the object in the screen shot is:
So I think what would be desirable to do as part of the fix here is:
Make sense? |
@joanmarie all makes sense. Thanks for trying it out!
Will do the changes next week. Thanks! |
@joanmarie I have pushed a fix for this as we discussed, try it out and let me know how it goes. |
@isidorn Just gave it a spin. Works as expected. Thanks! There's still a bit of chattiness that I'd like to eliminate. Now when the page-tab is switched, Orca says:
Then, due to a caret-moved event for the newly-focused editor, Orca immediately says:
I was thinking that I could filter out the double-speaking of the editor name -- doing a sanity check to be sure the editor name matches the page tab name. But as you can see from the above, it doesn't for a couple of reasons:
Thoughts? |
Thanks for trying it out. For 1. let's continue the discussion in #94828 |
@isidorn When I'm working on Orca, I tend to think in terms of my platform's accessibility APIs rather than in terms of ARIA. Admittedly not especially helpful to you. Sorry about that! To clarify:
What I'm talking about in item 2 from my previous comment is: Should we make the Related aside: Independent of accessibility, why does the If that's really desired, perhaps those 40 characters should continue to be part of the The reason I think it should continue to be part of the The reason I question the above is because it's chatty. And as a sighted user, seeing the first line of text displayed in the Anyhoo given the current up-to-40-character Make sense? |
@joanmarie thanks for claryfing. Yeah agree the aria-label of the Before you do any workarounds for Orca let's look into #94828 |
Steps to reproduce (in Linux):
Expected results: The listener would print out an accessibility event each time the active page changes.
Actual results: (crickets)
Compare with: Any application which supports multiple page tabs and has accessibility enabled (e.g. Gedit, Firefox, Chromium, Terminator, etc.)
Impact: Orca does not announce the newly-selected/active page when Alt+n (where n is the pagetab index) is used in VSCode
Notes:
aria-selected
on thetab
instances in thetablist
, which brings me to:tab
role on it. As you'll see in ARIA Practices and ARIA spec,tablist
elements containtab
children. (And thosetab
children supportaria-selected
). If those elements are there and I'm just failing to see them, my apologies. But if they are indeed missing:tab
role instead have a role ofpresentation
but anaria-label
whose value ends with ", tab". I believe the globalaria-label
causes thepresentation
role to be ignored by user agent implementations. Thus the accessibility tree winds up with generic-roled elements which have a name which includes the role name. Assuming these elements are the ones which should have the ARIAtab
role, they should lose the ", tab" in thearia-label
value. Otherwise once the expected events are emitted, screen readers will start presenting the newly-selected tab like "foo, tab. tab" or "foo, tab. page tab."@isidorn for input. Thanks!
The text was updated successfully, but these errors were encountered: