-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTML-AAM: select element should map to listbox role regardless of presentation #46
Comments
From @asurkov on June 21, 2016 12:9 You're not arguing for having both combobox and listbox roles, right? On semantic level HTML:select is a combobox widget, and HTML:select@size>1 is a listbox widget. At least I'm not sure I follow "interaction model" argument, because HTML:select looks and behaves like a combobox. On API level the browser exposes these widgets (presentations) differently too, for example, it creates different accessible trees for them. Also this is definitely a legacy issue, and the proposed changes are not backward compatible. |
No, listbox role only. I have never seen a html select that works like a combobox. They work only like listbox. The legacy native platforms also have confusing semantics. In native apps, for many years, there have been elements called comboboxes but they work just like a single select listbox. That is, they do not have a edit input where you can type a value to filter the suggestion list. ARIA has defined combobox as the combined presentation of an input and a suggestion list. If there is no input, then it is just a suggestion list, which is the description of combobox. The role tells the assistive technology what the interaction model is. For example, a desktop screen reader can provide keyboard interaction hints to the user based on the role. Calling a select element a combo is problematic because it does not have the keyboard interaction model of a combobox. It works like a listbox regardless of the size attribute value. |
On Sat, Oct 15, 2016 at 2:55 PM, Matt King [email protected] wrote:
Could you link me please to definitions of combobox and listbox widgets?
|
I'm not following the arguments why HTML:select@size="1" is a listbox widget. @jasonkiss do you have opinion on this issue? how do we want to proceed with it? |
I'm not sure if ARIA definitions are relevant here. I argue that HTML:select@size=1 is a combobox widget from the user perspective, i.e. it has a look and feel of a combobox widget. Note, from AT perspective, HTML:select@size=1 is exposed as a combobox widget too, i.e. it has combobox role and contains a listbox child, which more or less matched to ARIA combobox definition. |
The purpose of role for assistive technology users it to describe the interaction model. I believe the ARIA definition is relevant. The HTML-AAM section 4.4 starts out by stating the requirement to follow mappings in core ARIA. And, the second column of the table is the corresponding ARIA role, which is an explicit statement that the ARIA definition of the role is relevant. HTML:select@size=1 and HTML:select@size=2 have exactly the same interaction model. Neither has an edit box like an ARIA combobox. Because there is no edit box, you can not use the left/right arrow inside the HTML:select@size=1 to read through the characters of the current value or select them for copy/paste. HTML:select@size=1 does not have the look or feel of a combobox from the perspective of a screen reader user or anyone else using a keyboard. HTML:select@size=1 works exactly like HTML:select@size=2, which is mapped to a listbox. And, HTML:select@size=1 and HTML:select@size=2 both work exactly like the way ARIA describes a listbox. I believe the current difference in mapping between HTML:select@size=1 and HTML:select@size=2 is based on an insignificant difference in visual appearance that has no baring on the functional capabilities of the element. |
@mcking65 are we on the same page that HTML:select@size="1" is a combobox widget in its user perception, but your point is that ARIA role='listbox' definition feels closer for the HTML:select@size='1'? Or do you claim that HTML:select='1' is a listbox widget in general? I wouldn't say that their visual difference of HTML:select widgets is insignificant, HTML:select@size='2' is a classic listbox (which doesn't have any popups), while HTML:select@size='1' is a drop-down widget. My point is HTML:select@size='1' is a non-editable combo box; both on AT API mapping level and in its visual appearance. If we choose ARIA listbox role for its mapping, then it'd be rather confusing, even its description feels closer to HTML:select='1'. Actually I think that ARIA combobox definition should be changed to allow non-editable combo boxes to not have underlying editable textboxes. @jasonkiss ? |
I thought a combobox has an editable text box, which the HTML select
element does not.
…--
Regards
SteveF
Current Standards Work @w3c
<http://www.paciellogroup.com/blog/2015/03/current-standards-work-at-w3c/>
On 9 January 2017 at 14:50, Alexander Surkov ***@***.***> wrote:
@mcking65 <https://github.com/mcking65> are we on the same page that
***@***.***="1" is a combobox widget in its user perception, but
your point is that ARIA role='listbox' definition feels closer for the
***@***.***='1'? Or do you claim that HTML:select='1' is a listbox
widget in general?
I wouldn't say that their visual difference of HTML:select widgets is
insignificant, ***@***.***='2' is a classic listbox (which doesn't
have any popups), while ***@***.***='1' is a drop-down widget.
My point is ***@***.***='1' is a non-editable combo box; both on AT
API mapping level and in its visual appearance. If we choose ARIA listbox
role for its mapping, then it'd be rather confusing, even its description
feels closer to HTML:select='1'. Actually I think that ARIA combobox
definition should be changed to allow non-editable combo boxes to not have
underlying editable textboxes. @jasonkiss <https://github.com/jasonkiss> ?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#46 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAzBE4ioFVpm5BqJdi-uMwg8n1K5ssw5ks5rQkkugaJpZM4KUU-j>
.
|
@stevefaulkner I'm not sure why it has to be necessary condition, because both MSAA and ATK use successfully combobox role for these widgets, but otherwise ARIA probably need a new role for dropdowns. Anyway ARIA role='listbox' is not a match for HTML:select='1' even if ARIA role='combobox' doesn't work either. |
@asurkov wrote:
No; I do not believe it is a combobox at all because it does not have an edit box. @asurkov continued:
Yes; it feels closer because HTML:select@size='1 does precisely what ARIA says a listbox should do. @asurkov continued:
Yes, I assert that from an API mapping perspective, it should be classified as a listbox. It is most likely legacy Windows definitions of combo that created lots of flavors of combo, several of which are simply redundant with what is adequately described by the ARIA listbox role. @asurkov continued:
If you are using an assistive technology that relies on role values for rendering interactions, the way you operate a select is exactly the same regardless of the value of the size attribute. @asurkov continued:
A non-editable combobox would have a read-only edit that supports moving a caret and selecting all or a portion of the value. @asurkov continued:
By changing the mapping, my aim is to remove confusion. The current situation is confusing because screen reader users hear combobox, but there is no edit box. Super subtle distictions based on visual presentation are confusing to people who cannot see the screen. Two things that work exactly the same way should have the same role so their assistive tehcnology can provide them with reliable instructions for operation. @asurkov continued:
That would make combobox definition unnecessarily complicated and make it redundant with listbox. I would not support this because it would be an attempt to convey visual presentation instead of meaningful interaction. |
@asurkov wrote:
I maintain it is not successful; it is complicating. It prevents assistive technologies from doing a really good job of making combobox easier to use and understand because there are forms of it that are redundant with listbox. It is persisting legacy complications for no gain. @asurkov wrote:
In what way is the interaction of HTML:select@size=1 not described by ARIA listbox? |
Let me try to summarize, please correct me I'm wrong. There's only one difference between HTML:select@size=1 and non editable ARIA combobox, which is the user cannot select a text of a selected option in HTML:select, and thus you think that HTML:select is not a combobox. Then, you state that UI and behavioral difference between HTML:select='1' and ARIA listbox is rather minor, which is HTML:select@size='1' has a popup, but ARIA listbox doesn't have it, and the user has to click a HTML:select control to show all options of the popup before the user can click an option to select, but in case of ARIA listbox the user just clicks an option. I would say that the existing description of ARIA listbox may be used to describe HTML:select@size='1' at some extent, but it won't be exhaustive, because of popup thing, and that's a key difference between ARIA listbox and HTML:select@size='1' controls. It affects on the user experience and the way the control is exposed to AT. |
I agree with @asurkov that HTML:select@size='1' is not sufficiently described by ARIA listbox, since the popup/dropdown menu behaviour, which is included in the HTML5 spec for select@size='1', is not at all part of the ARIA listbox pattern. While listbox works for select@size>1 or select@multiple, I'm not sold on it for select@size='1'. But I don't think combobox works for select@size='1' either, because there's no edit box, which is important and core to the definition of ARIA combobox. @mcking65 is correct about the legacy confusion in the use of the word combobox. Note, for instance, that the definition of MSAA's ROLE_SYSTEM_COMBOBOX is "an edit control with an associated list box that provides a set of predefined choices." So here combobox jives with the ARIA definition. While the definition of ATK_ROLE_COMBO_BOX is simply a "collapsible list of choices the user can select from". So here combobox really means collapsible listbox. Safari and Chrome on MacOS render HTML:select@size='1' as AXPopUpButton with AXValue set to the currently selected option. Each option element is mapped to AXMenuItem. When the AXPopUpButton is pressed, or you start using the arrow keys to review the options, it presents a popup menu (role AXMenu) containing the menu items. So select@size='1' works differently here from other browsers where arrow keys alone, without also pressing ALT, do not cause the list of options to popup/dropdown like a menu. And so mapping it to listbox in AXAPI doesn't fit. But listbox doesn't quite fit for select@size='1' in ATK either, according to the definition of ATK_ROLE_LIST_BOX, because it is explicitly a "non-collapsible list of choices the user can select from." Meanwhile, UIA's ComboBox Control Type sounds applicable to either select@size='1' or select@size>1 and select@multiple:
I prefer the AXAPI approach of rendering and accordingly mapping select@size='1' to a button that presents a popup menu of choices, but given the variation across the browsers and a11y APIs, both in terms of implementation and their role definitions, we don't have a corresponding ARIA role that suits across all APIs. And I would say the Core-AAM mappings for combobox need to be reviewed in light of the above (CC @joanmarie @klown) But there are instances in the HTML-AAM where an element has a default corresponding ARIA role, but one or more of the APIs specify different mappings, so we could specify a corresponding role, then indicated exceptions as applicable. Based on the existing UA behaviour, a11y API role definitions, and Core-AAM mappings, I'm seeing something like this for select@size='1': -MSAA+IA2: map to ROLE_SYSTEM_LIST with IAccessible::accSelect() and IAccessible::get_accSelection() methods [same as ARIA listbox mapping in Core-AAM] So who's got a good solution here? |
@jasonkiss wrote:
The "popup" behavior is pure presentation. The keyboard interaction of select is identical regardless of the value of the size attribute. As I am now working on drafting the APG combobox pattern, this confusion introduced by select mapping is gaining new urgency. In case anyone is interested, the |
At the May 2018 meeting of ARIA WG at Mozilla in Toronto, we discussed this issue. Unfortunately, I cannot find where in the minutes: It's quite odd that the discussion was not captured. There is the possibility that I'm overlooking it. So, the following is from memory. Conclusion was to work on solving by:
|
Not quite. Sure, if you give focus to an html select, you can use the up/down arrow keys (or type the first letter of an option) to choose a value, and this behavior is identical to listbox. However, there are additional keystrokes for HTML:select@size='1' that do not apply for listbox:
Note specifically that alt+up/down in a listbox will change the selection, but alt+up/down in select@size='1' will not. |
The select element (size=1) and the input element with a list attribute are different elements, but have the same role: combobox. The problem should be fixed so that select elements are always output as listbox (or with another role), but never as combobox. Examples of differences:
For blind users there is hardly a difference in functionality and operation between select size=1 and select size > 1, but a difference to input with list attribute. Note: JAWS, for example, outputs the elements with different role names. Note: The W3C does not use the combobox role in the ARIA Practices, but a button and the listbox role to build a select size=1 with ARIA (http://www.w3.org/TR/wai-aria-practices-1.1/examples/listbox/listbox-collapsible.html). Note: According to the ARIA specification, role=combobox can be used together with a read-only input field and then resembles a select size=1. However, this is no longer equivalent to input with list-attribut, because readonly attribute causes the whole element to be read-only. In my opinion, all the confusion with combobox results only from the fact that in desktop applications from e.g. Microsoft the drop-down lists that correspond to select size=1 are called combobox. |
It may shed some light to consider the simple etymology of the word "combobox" -- "combo" refers to the combination of an editable text field and a list of options. If there's no text field, there's no combination of controls, so there's no combobox. So I agree with @mcking65 that a size-1 HTML select is a (visually-collapsed) listbox. Just stumbled on this thread while researching another pattern, apologies to randomly barge in :) |
If select is not associated with listbox as it used to be, several documents still containing the old assignment would have to be revised, e.g. https://www.w3.org/WAI/WCAG21/Techniques/html/H91, example 6: "Example 6a has a role of list box from the select element." |
My vote is we should keep the mappings as-is for now. Excellent example of mismatched paradigms between HTML and native platfrom APIs, unfortunately. ☹ For UIA specifically, the expectation is that a ListBox supports multiple selections, Combobox supports singular selections, has an expand/collapse paradigm, and can take 0 or 1 edit boxes (the description actually describes pretty well a I think the user experience problems would be best addressed by AT. Perhaps future exploration of the paradigm can occur on the native API layer, at least with modern APIs. But I don't believe the best place to start is by changing HTML mappings, because we'll still have issues, just different ones. |
I struggled with this issue the past few days. Especially because the different specifications (and versions) directly conflict with each other. Using editors drafts
-- https://w3c.github.io/aria/#combobox Clearly not a
-- https://w3c.github.io/html-aria/#el-select
-- https://w3c.github.io/aria-practices/#Listbox And then how Chrome 77 currently displays this in their a11y tree: <label>
Use release channel
<select>
<option>canary</option>
<option selected>alpha</option>
<option>beta</option>
</select>
</label> Those are actually Using working drafts
-- https://www.w3.org/TR/wai-aria-1.2/#combobox
-- https://www.w3.org/TR/html-aria/
-- https://www.w3.org/TR/wai-aria-practices-1.1/#combobox And this is IMO the strongest argument for a listbox:
-- https://www.w3.org/TR/html50/forms.html#the-select-element SummaryAs I interpret this the governing spec (as I see ARIA) disagrees with the mapping and the example implementation as well. Only the spec about the mapping from spec to implementation defines a PS: Fairly new to W3C specs but why is this even discussed in HTML-AAM? The current spec does not contain any section describing how native HTML elements map to ARIA. I only found sections about this in HTML-ARIA. |
With the combination of w3c/aria#1051, w3c/aria#1223, and w3c/aria#1225, the ARIA 1.2 combobox no longer needs to include or be made from an element with the textbox role, and it can expose a value to assistive technologies without an editable input element. Thus, the ARIA 1.2 combobox can perfectly emulate a select@size=1. With these changes, the HTML-AAM mapping of select@size=1 to the combobox role makes perfect sense. So, assuming these ARIA changes make it all the way through to rec, we can close this issue. |
@mcking65 Is there a working example of the 1.2 pattern in the APG? I can't make heads or tails off all the contradicting SHOULD statements in the ARIA 1.2 combobox. Specifically, I'm not understanding how you can say with such a confidence that the combobox "no longer needs to include or be made from an element with the textbox role". The ARIA 1.2 combobox mentions an input multiple times and a select@size=1 does not have an input but a button. |
ARIA 1.2 says:
The second part of the definition (after the "or") applies to select size=1. I suppose that there is nothing to change. I also consider the current solution inappropriate (see w3c/aria#1051 (comment)). |
I too am struggling to understand why a select size 1 would be a combobox and not a button with-a popup. |
Sure, I'm not saying that there are sentences from which I can derive a markup that implements select@size=1. It's just that sentences contradict each other. First a combobox always has an input and in the next sentence it doesn't need one. Maybe I'm reading the spec wrong? Does the last sentence always override previous ones? |
You're right. The first sentence should be reworded. It is currently:
This contradicts the second sentence. Sorry, I had not read carefully enough |
The problem with a button is that it cannot have most of the important properties of a form field, such as invalid, required, errormessage, etc. Also it cannot have a label and a value at the same time. |
APG example: https://w3c.github.io/aria-practices/examples/combobox/combobox-select-only.html The word "input" in the combobox spec refers to the abstract "input" role. |
I think this is only valid for the first sentence (input is also linked there):
But I don't think it applies to the second sentence (different name and formatting):
Not to mention that "input field" is wrong, because it is not always an input field, but just a div or any other element without role, if select@size=1 is to be emulated. I think that the sentences should be reformulated (w3c/aria#1349). |
Let's please not get off topic with commenting on ARIA/APG wording in this issue. Per the issue that @JAWS-test just opened, any ARIA wording discussion can move there. To tie up some lingering comments about misalignment is specs / how browsers expose element roles, there is no misalignment (save for the reference to the HTML 5.0 spec, which is outdated when compared to the 5.2 spec... which that information is redundant to ARIA in HTML which is what the HTML Living Standard references). HTML AAM indicates the current mappings correctly. ARIA in HTML says similar. The ARIA spec is talking about the |
I think we can close this issue now. It is essentially overcome by events -- the changes in ARIA to accommodate existing mappings. |
Agree @mcking65, thanks |
From @mcking65 on May 2, 2016 2:6
The html AAM maps the select element differently based on the size and multiple selection values.
This seems like using role to describe presentation rather than interaction model.
HTML select has the interaction model of a listbox regardless of the value of size.
ARIA combo is defined as a composite that includes a textbox and a separate popup element. HTML select does not include a textbox that instantiates a separate popup element.
In the APG, when describing how to build a custom element that is a single-select list, it seems strange that we would tell authors to use combobox when presenting the widget one way and listbox when presenting it another, even if both presentations have the same interaction model.
I propose that HTML select should always map to listbox.
Copied from original issue: w3c/aria#359
The text was updated successfully, but these errors were encountered: