[CTW] Name not updated when text of text leaf changes
Categories
(Core :: Disability Access APIs, defect)
Tracking
()
People
(Reporter: Jamie, Assigned: Jamie)
References
(Blocks 1 open bug)
Details
(Whiteboard: [ctw-m6])
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
diannaS
:
approval-mozilla-beta+
|
Details |
STR (with the NVDA screen reader):
- Open this test case:
data:text/html,<button onclick="this.firstChild.data = 'after';">before</button>
- Tab to the button.
- Press it.
- Shift+tab, then tab to re-focus the button.
- Expected: NVDA should say "after button".
- Actual: NVDA says "before button".
If you replace the text leaf (e.g. by setting .textContent on the button), this works as expected. It breaks here because the text of the leaf is changed without replacing the leaf.
Impact: This breaks the new toot indicator (e.g. "Show 4 more" button) in Semaphore.
Originally reported to me by a user on Mastodon.
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 1•2 years ago
|
||
Previously, PushNameOrDescriptionChange wouldn't consider the target itself as a candidate for a name change event.
If the text of a text leaf changes without replacing the leaf, the only event we will get is text inserted on its parent.
If that parent calculated its name from its subtree, this meant that we wouldn't fire a name change in this case.
We address this by allowing this function to fire on the target itself in this case.
Comment 3•2 years ago
|
||
bugherder |
Assignee | ||
Comment 5•2 years ago
|
||
Comment on attachment 9323837 [details]
Bug 1823294: Make PushNameOrDescriptionChange fire a name change event on the target itself if appropriate.
Beta/Release Uplift Approval Request
- User impact if declined: Incorrect label exposed to screen reader users after certain changes.
- 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 causes additional a11y name change events to fire.
- String changes made/needed:
- Is Android affected?: Yes
Comment 6•2 years ago
|
||
If we uplift this, will we need to uplift bug 1824178 as well? (that is if bug 1824270 is a dup of this)
Comment 7•2 years ago
|
||
No, that was caused by a change which landed in 113 that was unrelated to this bug.
Comment 8•2 years ago
|
||
Comment on attachment 9323837 [details]
Bug 1823294: Make PushNameOrDescriptionChange fire a name change event on the target itself if appropriate.
Approved for 112.0b8
Comment 9•2 years ago
|
||
bugherder uplift |
Updated•2 years ago
|
Updated•2 years ago
|
Comment 10•2 years ago
|
||
I have reproduced this issue using Firefox 110.0b8 on Ubuntu 22.
I can confirm this issue is fixed, I verified using Firefox 113.0a1 latest nightly (2023.03.30) and Firefox 112.0b8 on Ubuntu 22 opening the test case and go with tab key from keyboard up to "before" button, now the screen reader says "before push button" then after click on enter and came back with tab key to the button the screen reader says "after push button".
On Windows I am not able to reproduced this issue with NVDA, I verified on Firefox latest nightly and on Firefox 112.0b8 builds, it seems to work as expected. The same is on macOS 12 with VoiceOver, everything works as expected on Firefox latest nightly 113.0a1 and on Firefox 112.0b8.
Is it ok to change the bug flags to verified?
Updated•2 years ago
|
Assignee | ||
Comment 11•2 years ago
|
||
Yes. If you wanted to reproduce the bug with NVDA, you could use a version of Firefox from before this patch landed, but you would need to set accessibility.cache.enabled to true in about:config and restart Firefox.
Updated•2 years ago
|
Description
•