Closed Bug 1667494 Opened 4 years ago Closed 2 years ago

Screen readers do not correctly read selected <select> options if there are multiple text nodes in the <option>

Categories

(Core :: Disability Access APIs, defect)

Firefox 81
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: me, Unassigned)

References

(Blocks 1 open bug)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36

Steps to reproduce:

Create a <select> with an <option> inside of it, and append more than one text node to the <option>: https://codepen.io/pzuraq/pen/PoNLmor

On Windows, select an option while a screen reader, such as NVDA, is enabled.

Actual results:

The screen reader reads out that a combobox was collapsed, and reads out the first text node of the selected option. If the first text node is empty, nothing is read.

Expected results:

The screen reader should read out that a combobox was collapsed, and the full text of the selected option.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

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

Confirmed. Nasty, but probably rare.

This is caused by this 17+ year old code (originally landed in bug 124452!), which didn't anticipate this case:
https://searchfox.org/mozilla-central/rev/f27594d62e7f1d57626889255ce6a3071d67209f/accessible/html/HTMLSelectAccessible.cpp#124
I wonder if we can use nsTextEquivUtils::GetNameFromSubtree instead of explicitly getting the first text node? We have to be a little careful though because HTMLSelectOptGroupAccessible inherits from HTMLSelectOptionAccessible and we don't want optgroups to get name from subtree.

Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true
Blocks: htmla11y
OS: Unspecified → All
Hardware: Unspecified → All
Summary: Screen readers do not correctly read selected <select> options if there are multiple text nodes in the <option> (Windows) → Screen readers do not correctly read selected <select> options if there are multiple text nodes in the <option>
Blocks: 1678534

I'm not able to reproduce this. I think Emilio fixed it here. I'm new, so not totally sure on the process here, but I think we can mark this bug fixed.

Also, while testing this, I found another issue, logged separately here.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WORKSFORME
Depends on: 1744009
You need to log in before you can comment on or make changes to this bug.