Tabs in a collapsed tab group remain in the accessibility tree
Categories
(Firefox :: Tabbed Browser, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox143 | --- | fixed |
People
(Reporter: Jamie, Assigned: sthompson)
References
(Blocks 1 open bug)
Details
(Keywords: access, Whiteboard: [fidefe-tabgrps-tabbrowser])
Attachments
(1 file)
STR (with the NVDA screen reader, but I'm almost certain this will be true for VoiceOver as well):
- Open a tab with example.com and move it into a tab group.
- Focus the tab bar, arrow to the button to toggle the tab group and press space to collapse it.
- Use the screen reader's command to move to the next object (NVDA desktop: NVDA+numpad6, NVDA laptop: NVDA+shift+rightArrow, VoiceOver: VO+rightArrow).
- Expected: The screen reader should report the Open a new tab button.
- Actual: The screen reader reports the Example Domain tab.
When a tab group is collapsed, it seems its <tab>
elements aren't removed from the DOM and are still rendered by layout; i.e. they don't have hidden, display: none or similar. They just have a width of 0, so they aren't visible. This means they are still in the accessibility tree, which is incorrect because they shouldn't be perceivable semantically given that the tab group is collapsed.
Ideally, these should have hidden or display: none or the like. If that isn't a feasible implementation, they should get aria-hidden="true" until the tab group is expanded again.
Updated•5 months ago
|
Updated•5 months ago
|
Updated•5 months ago
|
Updated•5 months ago
|
Assignee | ||
Updated•2 months ago
|
Assignee | ||
Comment 1•2 months ago
|
||
Added a visibility
transition on tabs to match the transition duration that we use for the expand/collapse animation of horizontal tab groups. Added visibility: hidden
on tabs in collapsed tab groups so that they are removed from the accessibility tree at the end of the collapse animation.
Updated•2 months ago
|
Assignee | ||
Comment 2•2 months ago
|
||
Hi :Jamie, I received a question about my patch for this bug and I'm not sure how to proceed.
Add-ons are able to hide tabs https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/tabs/hide. A hidden tab will not be in the accessibility tree for the <tabs> element (i.e. the tab strip), which makes sense. It appears that a hidden tab will still be in the accessibility tree for the <tabpanels> element (i.e. the actual tab content areas). I would naively believe that the hidden tab's contents should not be present in the <tabpanels> accessibility tree for the sake of consistency, but perhaps there are good reasons to continue to have it stay present in the accessibility tree. Do you have any ideas?
My patch removes tabs in collapsed tab groups from the tab strip accessibility tree (as requested in this bug) but keeps them in the tab content areas accessibility tree. Is this sufficient, or is there an opportunity to improve things in the tab content areas accessibility tree?
Reporter | ||
Comment 3•2 months ago
|
||
Great question. In most cases, your intuition would be correct: if we're going to remove a tab from the strip, we should also remove its content area. However, browser tabs are an exception to that rule. The reason is that assistive technology tools might cache information about a content document. Removing the content area would cause that information to be lost. This could cause the user to lose their position in the document when they eventually return to it, as well as having a performance impact due to needing to rebuild the cache. It would be similar to completely unloading a tab every time we hide it, which we don't do for similar reasons.
Assignee | ||
Comment 4•2 months ago
|
||
Thank you so much! I'll include this context in a comment in https://searchfox.org/mozilla-central/source/accessible/tests/mochitest/tree/test_tabbrowser.xhtml so that the difference between the <tabs> and <tabpanels> accessibility trees is explained.
Backed out for causing bc failures @ browser_bug1620341.js
Assignee | ||
Updated•6 days ago
|
Description
•