Closed Bug 1631693 Opened 4 years ago Closed 1 year ago

Non-editable ARIA comboboxes don't expose accessible value

Categories

(Core :: Disability Access APIs, defect, P3)

defect

Tracking

()

RESOLVED FIXED
109 Branch
Tracking Status
firefox109 --- fixed

People

(Reporter: Jamie, Assigned: nlapre)

References

(Blocks 1 open bug)

Details

(Keywords: papercut)

Attachments

(1 file, 1 obsolete file)

STR:

  1. Open this URL:
    data:text/html,<div role="combobox" tabindex="0">value</div>
  2. Right click the element and choose Inspect Accessibility Properties.
  3. Check the value property.
    • Expected: "value"
    • Actual: ""

ARIA supports both editable and non-editable combo boxes:

A combobox input MAY be either a single-line text field that supports editing and typing or an element that only displays the current value of the combobox.

This relates to non-editable combo boxes.

  • Core AAM doesn't say anything about exposing value on ARIA combobox. However, <select size="1"> controls do, as do combo boxes in other frameworks on Windows.
  • We already expose value for an editable combo box:
    data:text/html,<input role="combobox" value="value">
  • We already expose value if there is a selected option:
    data:text/html,<div role="combobox"><div role="listbox"><div aria-selected="true" role="option">value
    However, if the list is collapsed, it will probably be hidden, so there won't be a selected option.
  • Chrome already exposes value for the STR above.

The question is exactly what we should expose as the value. If there's a listbox descendant, we definitely don't want to expose the entire subtree. I think we should expose the subtree minus any listboxes, but I don't know if we have a way to do that currently.

Marking p3 because I can't find any uses of this in the wild currently. I thought Google Calendar had some of these controls (and Marco said the same), but I can't find any right now. They all seem to be list boxes.

Originally reported as NVDA issue: https://github.com/nvaccess/nvda/issues/9108

Severity: -- → S3
Blocks: 1702962
No longer blocks: 1702962
Blocks: 1702392

Here is the ARIA Authoring practices select-only combobox example where the current selected value of the collapsed combobox is not announced: https://w3c.github.io/aria-practices/examples/combobox/combobox-select-only.html

Note that JAWS and NVDA both announce the value correctly if using chromium browsers.

There is a core aam issue related to spec'ing the value that should be exposed for a comobobx here - https://github.com/w3c/core-aam/issues/70
but, as noted, this has not stopped Chromium from implementing this behavior now. Seems this is essentially a dupe of the other mentioned bug - https://bugzilla.mozilla.org/show_bug.cgi?id=1702392

Assignee: nobody → mreschenberg
Status: NEW → ASSIGNED

Comment on attachment 9287136 [details]
Bug 1631693: Expose label, not title, on entries and spinbuttons r?eeejay

Revision D152812 was moved to bug 1780228. Setting attachment 9287136 [details] to obsolete.

Attachment #9287136 - Attachment is obsolete: true
Assignee: mreschenberg → nobody
Status: ASSIGNED → NEW

Oops wrong bug number in phab, sorry! 😀

Assignee: nobody → nlapre

This revision expands the reporting of ARIA combobox values to non-editable
comboboxes with no selected option. In these cases, according to the spec, we
should report a value "represented by its descendant elements [...] determined
using the same method used to compute the name of a button from its descendant
content." In this revision, I interpret that to mean, roughly, nsTextEquivUtils'
GetTextEquivFromSubtree, which is tantamount to the name calculation, except
that it crucially avoids rejecting the combobox for having eNameFromValueRule,
unlike GetNameFromSubtree. This revision updates this logic in LocalAccessible
and RemoteAccessibleBase, and adds tests to verify the above.

Pushed by nlapre@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6661e82fb3d2
Expose value on non-editable ARIA comboboxes, r=Jamie
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 109 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: