Unable to select a tab with Narrator if it has focus and doesn't explicitly set aria-selected="false"
Categories
(Core :: Disability Access APIs, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox146 | --- | fixed |
People
(Reporter: Jamie, Assigned: Jamie)
References
(Blocks 3 open bugs)
Details
(Whiteboard: [uiaFastFollow])
Attachments
(2 files)
STR:
- Start Narrator.
- Open this test case:
data:text/html,<button>before</button><div role="tablist"><div role="tab" tabindex="0" aria-selected="true">a</div><div role="tab" tabindex="0" onclick="alert('b');">b</div></div><button>after</button> - Tab to the "b" tab.
- Expected: Narrator says "b tab item, 2 of 2" (no "selected")
- Actual: Narrator says "b tab item, 2 of 2, selected"
- Press enter.
- Expected: An alert pop-up appears saying "b".
- Actual: Nothing happens.
- Now, open the same test case, but with aria-selected="false" on the "b" tab; i.e.:
data:text/html,<button>before</button><div role="tablist"><div role="tab" tabindex="0" aria-selected="true">a</div><div role="tab" aria-selected="false" tabindex="0" onclick="alert('b');">b</div></div><button>after</button> - Tab to the "b" tab.
- Observe: Narrator says "b tab item, 2 of 2" (no "selected")
- Press enter.
- Observe: An alert pop-up appears saying "b".
The underlying issue here is that Gecko exposes the selected state when it shouldn't. Even though the tab has focus and there is no explicit aria-selected attribute, there is an aria-selected on another tab, so we shouldn't expose selection implicitly. This causes a big problem for Narrator because it refuses to select a tab that is already selected.
We fixed implicit selection for list options in bug 1894437. However, that doesn't extend to tabs because we special case focused tabs. I think we should just remove that special case, which is not covered by the spec. However, we should probably keep the special case for the active tabpanel, which is vaguely covered by the spec.
| Assignee | ||
Comment 1•6 months ago
|
||
Originally reported in bug 1993697 comment 2. Original test case: https://flamewolf.github.io/base-95.html
| Assignee | ||
Comment 2•6 months ago
|
||
For now, you can work around this by explicitly setting aria-selected="false" on unselected tabs, but obviously, we should fix the bug.
| Assignee | ||
Comment 3•6 months ago
|
||
Instead, for focused tabs, we should apply the same rules we use for options and treeitems.
Note that in browser_caching_states.js, I had to change one of the implicit selected state tests so that nothing in the container is explicitly selected in order to trigger implicit selection with these changed rules.
We have a test elsewhere in states/browser_test_selection.js which verifies that explicit selection takes precedence over implicit selection.
| Assignee | ||
Comment 4•6 months ago
|
||
This just moves the test with no other changes.
Previously, we had tests related to the implicit selected state in two different places, which is confusing at best.
Also, any progress we can make towards organising the wild dumping ground of tests in e10s/ is a good thing.
| Assignee | ||
Comment 5•6 months ago
|
||
Comment 7•6 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/dc987ad79e06
https://hg.mozilla.org/mozilla-central/rev/44b6d3448563
Updated•5 months ago
|
| Assignee | ||
Updated•5 months ago
|
Description
•