Closed Bug 1735868 Opened 3 years ago Closed 3 years ago

ARIA "on" state for role="switch" is not being announced


(Core :: Disability Access APIs, defect)

Firefox 93



95 Branch
Tracking Status
firefox95 --- fixed


(Reporter: jcreviston, Assigned: morgan)


(Blocks 1 open bug)



(2 files, 1 obsolete file)

Attached image html code (obsolete) —

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:93.0) Gecko/20100101 Firefox/93.0

Steps to reproduce:

Assign an ARIA role of 'switch' to a <div>. Ensure the element is focusable. Create relevant keyup events to toggle the value of 'aria-checked'.

Actual results:

The "off" state is announced correctly. If you press control+option+space on MAC, the aria-checked state changes to 'true', but the VoiceOver utility does not read the new state.

If you tab away from the element, then tab back, it still reads the state as "off".
If you programmatically set the element's aria-checked value to "true" initially, it still reads the state as off.
If you use a button or span element, instead of a div, the behavior is the same. I didn't try any other html elements.
If I change the role to 'checkbox', Firefox correctly announces checked and unchecked.

The off/on states are announced correctly in Chrome and Safari on the same system.

Expected results:

When the switch was toggled, and the aria-checked value was changed to "true", the VoiceOver utility should have been instructed to announce the "on" state of the switch.

Maybe Firefox doesn't fully support the role of switch yet? Although it announces the "off" state correctly.

Summary: ARIA "on" state for role="switch" is "on" not being announced → ARIA "on" state for role="switch" is not being announced
Attachment #9245973 - Attachment description: Screen Shot 2021-10-14 at 2.25.41 PM.png → html code
Attachment #9245973 - Attachment is obsolete: true

The Bugbug bot thinks this bug should belong to the 'Core::Disability Access APIs' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Disability Access APIs
Product: Firefox → Core

I'm guessing checkbox and switch need to have the checked state exposed differently on Mac.

Blocks: aria
Severity: -- → S3
OS: Unspecified → macOS
Hardware: Unspecified → Desktop

We don't map this in, so it's just getting the default mozAccessible. It should probably be something in mozActionAccessible, I can fix this.

Assignee: nobody → mreschenberg
Pushed by
Map roles::switch to mozCheckboxAccessible r=eeejay
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 95 Branch
You need to log in before you can comment on or make changes to this bug.