w3c / aria

Accessible Rich Internet Applications (WAI-ARIA)
https://w3c.github.io/aria/
Other
638 stars 123 forks source link

Misleading definition of combobox #1349

Open JAWS-test opened 3 years ago

JAWS-test commented 3 years ago

In my opinion the following definition in ARIA 1.2 for combobox is wrong:

A combobox functionally combines a named input field ...

The following sentence is clearer:

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

However, using MAY leaves open what else it could be.

I think the definition of combobox should be clear which elements may be used. Since I didn't create the new ARIA 1.2 combobox construct, I don't know what they are, but I suspect the following:

I think an exact definition is very important, because at the end AT has to distinguish between combobox with text input and without text input. Without a clear definition each AT will find its own way to make this distinction and then it will not be consistent.

See https://github.com/w3c/html-aam/issues/46#issuecomment-718938830

scottaohara commented 3 years ago

I interpret the use of input in the initially quoted sentence as being related to the first sentence's use of the input abstract role. Especially since in the following sentence where the term "text field" is used, rather than "input".

Per that reasoning, I read the MAY is essentially saying a combobox could be: <input role=combobox aria-label=foo> or <div role=combobox aria-label=foo tabindex=0 ...>value</div>

Regardless if i'm incorrect here or not, I do agree there could be some wording updates to clarify. Confusion about the use of input here strengthens my opinion that #1345 is a good idea.

JAWS-test commented 3 years ago

I interpret the use of input in the initially quoted sentence as being related to the first sentence's use of the input abstract role.

What speaks against it are the following facts:

scottaohara commented 3 years ago

your points don't change my interpretation, but rather stress the need for wording updates to clarify.

JAWS-test commented 3 years ago

I suggest to change the following sentences

A combobox functionally combines a named input field with the ability to assist value selection via a supplementary popup element. 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.

to

A combobox functionally combines an element for value input or an element for displaying the current value with the ability to assist value selection via a supplementary popup element. If the combobox allows text input, an input field (<input type=text>) MUST be used. If the combobox does not allow text input, an element without implicit ARIA role MUST be used (e.g. <div>).

It would also be good to add a new example after Example 6 that shows a combobox at a <div> element