ARIA role should not be set outside the expected context for gridcell, rowheader and columnheader (WPT wai-aria/role/grid-roles.html orphaned)
Categories
(Core :: Disability Access APIs, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox126 | --- | fixed |
People
(Reporter: howard-e, Assigned: nlapre)
References
(Blocks 3 open bugs)
Details
Attachments
(4 files)
Steps to reproduce:
Checked failures found in new WPT tests: https://wpt.fyi/results/wai-aria/role/grid-roles.html?label=experimental&label=master&aligned for:
- orphaned gridcell outside the context of row
- orphaned rowheader outside the context of row
- orphaned columnheader outside the context of row
Actual results:
Got the fail messages for the following markup:
<div role="gridcell" data-testname="orphaned gridcell outside the context of row" data-expectedrole="none" class="ex">x</div>
FAIL message: assert_equals: <div role="gridcell" data-testname="orphaned gridcell outside the context of row" data-expectedrole="none" class="ex">x</div> expected "none" but got "gridcell"
<div role="rowheader" data-testname="orphaned rowheader outside the context of row" data-expectedrole="none" class="ex">x</div>
FAIL message: assert_equals: <div role="rowheader" data-testname="orphaned rowheader outside the context of row" data-expectedrole="none" class="ex">x</div> expected "none" but got "rowheader"
<div role="columnheader" data-testname="orphaned columnheader outside the context of row" data-expectedrole="none" class="ex">x</div>
FAIL message: assert_equals: <div role="columnheader" data-testname="orphaned columnheader outside the context of row" data-expectedrole="none" class="ex">x</div> expected "none" but got "columnheader"
Expected results:
These should have all passed
| Reporter | ||
Comment 1•2 years ago
|
||
Comment 2•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Disability Access APIs' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 3•2 years ago
|
||
I wonder whether the expected role should be generic instead of none, but I think I saw that the harness will soon allow either for none anyway, so this might not really matter.
Updated•2 years ago
|
Updated•2 years ago
|
Comment 4•2 years ago
|
||
We have the same problem for listbox/option, menu/menuitem* and tree/treeitem. Whatever solution we come up with here should be extendable to all three.
Updated•2 years ago
|
| Assignee | ||
Comment 6•2 years ago
|
||
This revision changes the behavior of the Role function such that, for child
roles (in parent/child role relationships), the parent role must be present as
an ancestor for the child to have its assigned role. For instance, a "row" node
must have a table in its ancestry tree. To implement this, we walk parents. This
revision also fixes up and removes expected failures for around 18 web platform
tests.
NOTE: This revision is a work in progress. We may not need the changes, based on
the decisions of the ARIA spec maintainers / WPT maintainers.
| Assignee | ||
Comment 7•2 years ago
|
||
I wrote this issue to the powers that be. It looks like the resolution is to remove the tests. There's also this ARIA issue which might clarify further. At the moment, however, I suspect this issue will end up WONTFIX and the attached patch will be abandoned.
| Assignee | ||
Comment 8•2 years ago
|
||
It looks like these tests are actually valid, though there's some confusing spec disagreement. See this section of the CORE-AAM spec.
It says:
When an element has a role but is not contained in the required context (for example, an orphaned listitem without the required accessible parent of role list), User Agents MUST ignore the role token, and return the computedrole as if the ignored role token had not been included.
This stands in contrast to the language of the ARIA spec ("authors MUST" / "user agents are not responsible"), so I think we still need some spec clarification. However, it's not cut-and-dry that this issue is a WONTFIX. I think I'm going to revive the patch and clean it up.
| Assignee | ||
Comment 9•2 years ago
|
||
This revision implements the ARIA rowgroup role in Gecko. Previously, Gecko was
using roles::GROUPING for multiple types of groups and disambiguating them
in various places. This revision unwinds that while maintaining present
functionality.
Updated•2 years ago
|
| Assignee | ||
Comment 10•2 years ago
|
||
This revision adds a utility function to find the nearest non-generic ancestor
for which a given predicate returns true.
Updated•2 years ago
|
| Assignee | ||
Comment 11•2 years ago
|
||
This revision updates newly-failing tests after implementing the ancestor
requirements for certain child roles. Generally, this revision adds ancestors
where appropriate, because tests largely are not testing this particular
behavior.
Comment 12•2 years ago
|
||
Comment 13•2 years ago
|
||
Backed out for causing gv-junit failure on AccessibilityTest#testSelectable
Comment 14•1 year ago
|
||
Comment 15•1 year ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/eb17aa9cc1cb
https://hg.mozilla.org/mozilla-central/rev/c8e9ae699981
https://hg.mozilla.org/mozilla-central/rev/24a03f6f59b7
https://hg.mozilla.org/mozilla-central/rev/7815569d22d9
| Assignee | ||
Updated•1 year ago
|
Description
•