w3c / aria-practices

WAI-ARIA Authoring Practices Guide (APG)
https://www.w3.org/wai/aria/apg/
Other
1.21k stars 344 forks source link

Combox pattern contradicts listbox pattern on selection follows focus #2294

Open lenzls opened 2 years ago

lenzls commented 2 years ago

The comboxbox pattern states that in a listbox, the selection always follows the focus.

[…] Comboboxes and menu buttons can be implemented so users can explore the set of allowed choices without losing a previously made choice. That is, users can navigate the set of available choices in a combobox popup or menu and then press escape, which closes the popup or menu without changing previous input. In contrast, navigating among options in a single-select listbox immediately changes its value, and Escape does not provide an undo mechanism. […]

https://w3c.github.io/aria-practices/#combobox

But the listbox pattern itself states that selection-follows-focus is only optional behaviour.

Down Arrow: Moves focus to the next option. Optionally, in a single-select listbox, selection may also move with focus.

In a single-select listbox, moving focus may optionally unselect the previously selected option and select the newly focused option. This model of selection is known as "selection follows focus". Having selection follow focus can be very helpful in some circumstances and can severely degrade accessibility in others. For additional guidance, see Deciding When to Make Selection Automatically Follow Focus.

https://w3c.github.io/aria-practices/#Listbox

This seems to give a false impression on when the usage of listbox in combination with combobox is possible.

mcking65 commented 2 years ago

@lenzls

We discussed this in the task force meeting today, and do not understand what your concern is. Where is there a conflict? In particular, we do not understand this part of your comment:

This seems to give a false impression on when the usage of listbox in combination with combobox is possible.

JAWS-test commented 2 years ago

The problem is that the behavior of a listbox is described contradictorily: