w3c / html-aam

HTML Accessibility API Mappings - new spec updates should be made in https://github.com/w3c/aria/tree/main/html-aam
https://w3c.github.io/html-aam/
Other
100 stars 26 forks source link

Windows/Mac differences in presentation of some HTML-AAM implicit roles #467

Open cookiecrook opened 1 year ago

cookiecrook commented 1 year ago

While working on HTML-AAM automated role tests, I noticed there were a few implicit role expectations that seemed to align with a Windows-style rendering, but did not align with the macOS renderings.

In particular, this test of a select list without a size attribute:

<select data-testname="el-select-combobox" data-expectedrole="combobox" class="ex"><option>a1</option><option>a2</option></select>

Yields: assert_equals: expected "combobox" but got "button" in WebKit on macOS.

A true combobox is always (or almost always?) rendered as a text field with text-carat insertion and an associated menu. That's not the case for simple <select> menus on Mac. They actually render a button that triggers a menu.

Screen shots of simple select (not a "combobox"):

collapsed popup button expanded popup menu

I think this represents a platform-level user interface different that should be conveyed to the user of assistive technology. A Mac VoiceOver user would expect they could literally type or select text in a combobox, and that's not a valid assumption here.

In a related but inverse scenario, macOS renders <input type="number> as a text field with enclosed steppers, as opposed to the Windows-style "spin button."

Screen shot of simple number input (not a "button"):

text insertion field with 'stepper' buttons

Note: I'll try to add some screen shots of the equivalent Windows control to further the discussion.

In summary

JAWS-test commented 1 year ago

The difference in select is indeed relevant, but in spinbutton (input type=number) I don't see the difference between Mac and Windows, m.E. in both the HTML element is implemented the same. That the ARIA role spinbutton allows additional variants is correct, but has nothing to do with the operating systems (see https://github.com/w3c/aria-practices/issues/1155)

JAWS-test commented 1 year ago

Related: https://github.com/w3c/core-aam/issues/111

spectranaut commented 1 year ago

Discussed in the ARIA working group today: https://www.w3.org/2023/04/20-aria-minutes#t05

scottaohara commented 1 year ago

Reminder to consider the points raised in this issue when working on this one: https://github.com/w3c/html-aam/issues/473

smhigley commented 1 year ago

Another consideration that came up in the call -- certain attributes like aria-invalid are valid on a <select>, but not on a button role.

JAWS-test commented 1 year ago

Another consideration that came up in the call -- certain attributes like aria-invalid are valid on a select, but not on a button role.

Also true for

Furthermore, a select has a value and a label, a button has only a label, no value.

spectranaut commented 1 year ago

To schedule after TPAC