Closed Bug 1933156 Opened 11 months ago Closed 11 months ago

Changes in focused XUL button label not announced by screen readers

Categories

(Core :: Disability Access APIs, defect)

defect

Tracking

()

VERIFIED FIXED
135 Branch
Tracking Status
firefox135 --- verified

People

(Reporter: henry-x, Assigned: Jamie)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Steps to reproduce

Example:

  1. Visit de.wikipedia.org.
  2. Select some text and choose "Translate Selection".
  3. Wait for the translation to complete.
  4. Navigate to the "Copy" button.
  5. Activate the button, which switches the label to "Copied".

Expected

Screen reader should announce the new button label "Copied" since it is focused.

Actual

No response from screen reader to the change in label.

Tested on linux with Orca with my firefox dev build, and on windows 10 with NVDA with firefox 132.0.2.

Origin

I think this may be a result of the xul:button using the xul:label value attribute, rather than a Text node. I.e. the button has no text content.

When testing with Orca, changing the Fluent from

select-translations-panel-copy-button =
    .label = Copy

select-translations-panel-copy-button-copied =
    .label = Copied

to

select-translations-panel-copy-button = Copy

select-translations-panel-copy-button-copied = Copied

resolves the issue. I.e. setting the textContent (and replacing the usual xul:button structure) resolves this. But this is not a good solution to the problem since it just discards all the complexities of the xul:button. I guess you could use something similar to the HighlightableButton class used in about:preferences, or switch to <moz-button>, but maybe this can be addressed in the accessibility core.

Blocks: xula11y
Severity: -- → S3
OS: Unspecified → All
Hardware: Unspecified → All

This just converts the existing test to use the promise-based waitForEvent instead of eventQueue.
This will make it much easier to add other tests in subsequent patches.

Assignee: nobody → jteh
Status: NEW → ASSIGNED
Pushed by jteh@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f008ccecc299 part 1: Promisify test_namechange.xhtml. r=nlapre https://hg.mozilla.org/integration/autoland/rev/51fd32a534ae part 2: Fire a name change event when a XUL button's label attribute changes. r=nlapre
Status: ASSIGNED → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → 135 Branch
See Also: → 1943980

This implementation works on MacOS 11 and Windows 10, but it does not work on Ubuntu 22.
I have logged a follow-up bug for the remaining operating system: bug 1943980.
This being said, I will close this report. Please reopen if necessary. Thank you.

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

Attachment

General

Created:
Updated:
Size: