[CTW] Deal with unintended semantics due to role="presentation" being overridden by transforms or position: fixed/sticky
Categories
(Core :: Disability Access APIs, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr102 | --- | unaffected |
firefox110 | --- | unaffected |
firefox111 | --- | fixed |
firefox112 | --- | fixed |
People
(Reporter: Jamie, Assigned: Jamie)
References
(Regression)
Details
(Keywords: regression, Whiteboard: [ctw-m5])
Attachments
(2 files)
48 bytes,
text/x-phabricator-request
|
dmeehan
:
approval-mozilla-beta+
|
Details | Review |
48 bytes,
text/x-phabricator-request
|
dmeehan
:
approval-mozilla-beta+
|
Details | Review |
In bug 1806356 and bug 1814800, we forced the creation of Accessibles for elements with transforms and position: fixed/sticky. This was necessary for the cache. This is fine for generic elements like divs and spans, since clients already have to ignore those in many cases. However, it's not great for elements with semantics like tables. For example:
data:text/html,<table style="position: sticky;" role="presentation"><tr><th>test
This table will be exposed as a table in the a11y tree, even though it has role="presentation". In contrast, if you remove the styling, role="presentation" applies as expected and the table is exposed as generic Accessibles.
Note that focusability and global ARIA attributes have always completely overridden role="presentation" and preserved their semantics. However, that is specified behaviour and should remain as is.
There are a couple of ways we could fix this problem with Accessibles forced by styling:
- Expose these forced Accessibles with generic roles. This would require us to differentiate between cases where we absolutely should override role="presentation" and cases where we just need a generic Accessible. That is, we'd need to split up MustBeAccessible or have it return different answers for these two cases.
- Support ignored children in the core tree. This would require us to cache the ignored child count at least. It also adds another layer of complexity, given that we already have ignored children on Mac.
- We could try to move most of Mac's ignored children logic into the core tree. However, each platform would need to be able to extend the rules for whether something is ignored or not. That would mean the core tree would have some different data on different platforms, which doesn't seem great. ON the other hand, it avoids duplication this logic.
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Comment 1•1 year ago
|
||
Otherwise, semantics are exposed (e.g. for a table), which completely defeats the author's intent that this be treated as presentational.
Assignee | ||
Comment 2•1 year ago
|
||
For the record, we discussed the ignored children approach. Even if we did that (and we may still do so later), we would have needed the generic Accessibles patch anyway. Otherwise, even though the table would have been ignored, we would have exposed table rows and cells.
Updated•1 year ago
|
Assignee | ||
Comment 3•1 year ago
|
||
Previously, the test was retrieving an Accessible with a non-existent id and calling testAccessibleTree on it.
That meant we were calling testAccessibleTree with null, which is a no-op.
Now, we get the intended Accessible so that the test actually tests what it was supposed to test.
This is important to test a potential bug in the next patch.
Pushed by jteh@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/22b32e106152 part 1: Fix the transform tree creation test in browser_test_simple_transform.js. r=nlapre https://hg.mozilla.org/integration/autoland/rev/eeb78c17513c part 2: If we force an Accessible to be created due to transform/fixed/sticky despite it being presentational, make it a generic Accessible. r=nlapre
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Updated•1 year ago
|
Comment 5•1 year ago
|
||
Backed out for causing failures at test_table.html.
Backout link: https://hg.mozilla.org/integration/autoland/rev/376be91f6486a59d752066b306d0bbf3e8e08fb4
Failure log:
Comment 6•1 year ago
|
||
Set release status flags based on info from the regressing bug 1806356
Assignee | ||
Updated•1 year ago
|
Pushed by jteh@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/daddc9682f04 part 1: Fix the transform tree creation test in browser_test_simple_transform.js. r=nlapre https://hg.mozilla.org/integration/autoland/rev/7ce58b734414 part 2: If we force an Accessible to be created due to transform/fixed/sticky despite it being presentational, make it a generic Accessible. r=nlapre
Comment 8•1 year ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/daddc9682f04
https://hg.mozilla.org/mozilla-central/rev/7ce58b734414
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Comment 9•1 year ago
|
||
Comment on attachment 9318337 [details]
Bug 1816346 part 2: If we force an Accessible to be created due to transform/fixed/sticky despite it being presentational, make it a generic Accessible.
Beta/Release Uplift Approval Request
- User impact if declined: Some elements (e.g. tables) marked as presentational might be incorrectly exposed to screen reader users.
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: No
- If yes, steps to reproduce:
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Covered by automated tests. Only impacts accessibility exposure of elements in specific cases.
- String changes made/needed:
- Is Android affected?: Yes
Assignee | ||
Updated•1 year ago
|
Comment 10•1 year ago
|
||
Comment on attachment 9318337 [details]
Bug 1816346 part 2: If we force an Accessible to be created due to transform/fixed/sticky despite it being presentational, make it a generic Accessible.
Approved for 111.0b5
Comment 11•1 year ago
|
||
Comment on attachment 9318643 [details]
Bug 1816346 part 1: Fix the transform tree creation test in browser_test_simple_transform.js.
Approved for 111.0b5
Comment 12•1 year ago
|
||
bugherder uplift |
https://hg.mozilla.org/releases/mozilla-beta/rev/5e946bd47732
https://hg.mozilla.org/releases/mozilla-beta/rev/f85e91c7be37
Description
•