Closed Bug 1823294 Opened 1 year ago Closed 1 year ago

[CTW] Name not updated when text of text leaf changes

Categories

(Core :: Disability Access APIs, defect)

defect

Tracking

()

VERIFIED FIXED
113 Branch
Tracking Status
firefox111 --- wontfix
firefox112 --- verified
firefox113 --- verified

People

(Reporter: Jamie, Assigned: Jamie)

References

Details

(Whiteboard: [ctw-m6])

Attachments

(1 file)

STR (with the NVDA screen reader):

  1. Open this test case:
    data:text/html,<button onclick="this.firstChild.data = 'after';">before</button>
  2. Tab to the button.
  3. Press it.
  4. 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.

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.

Pushed by jteh@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0c4b4b47efa7
Make PushNameOrDescriptionChange fire a name change event on the target itself if appropriate. r=eeejay
Regressions: 1824270
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 113 Branch

Does this need a Beta uplift request?

Flags: needinfo?(jteh)

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
Flags: needinfo?(jteh)
Attachment #9323837 - Flags: approval-mozilla-beta?

If we uplift this, will we need to uplift bug 1824178 as well? (that is if bug 1824270 is a dup of this)

Flags: needinfo?(jteh)

No, that was caused by a change which landed in 113 that was unrelated to this bug.

Flags: needinfo?(jteh)

Comment on attachment 9323837 [details]
Bug 1823294: Make PushNameOrDescriptionChange fire a name change event on the target itself if appropriate.

Approved for 112.0b8

Attachment #9323837 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Flags: qe-verify+
QA Whiteboard: [qa-triaged]

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?

Flags: needinfo?(jteh)

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.

Flags: needinfo?(jteh)
Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: