downshift
downshift copied to clipboard
Aria 1.2 support for useCombobox
-
downshift
version: 6.0.6 -
node
version: 14.15 -
npm
(oryarn
) version: 6.14.9
What you did: Implement a searchbox with dropdown suggestions as combobox
What happened: accessibility tool is not passing aria 1.2 specification for combobox
Are there any plans to support aria 1.2 when it is officially published?
Yes, we should transition to aria 1.2. Unfortunately it will mean a breaking change, since there will not be any combobox wrapper of the input.
Note that ARIA 1.2 reached W3C Candidate Recommendation status today.
From what I see in your PR we can still achieve Aria 1.2 support by merging attributes from getInputProps and getComboboxProps/getRootProps.
Moving forward, we should deprecate the latter and move everything to getInputProps.
However, when do you think it would be the right time to do so? The new 1.2 guidelines should not only be final, but also supported by all screen readers, right? @carmacleod
The new 1.2 guidelines should not only be final, but also supported by all screen readers, right? @carmacleod
The 1.2 guidelines for combobox will not be changing. The document itself is a Candidate Recommendation, which means it's really close to final (final = Recommendation). It also means we're done changing it. :)
The 1.2 combobox currently has the best support in screen readers of any previous combobox pattern, and it is the one we recommend moving forward. The ARIA-AT project aims to bring more consistency to screen reader output in general, and combobox is on their radar.
I will leave this open to track the migration to 1.2. Everyone can do this manually by merging getRootProps/getComboboxProps with getInputProps and adding everything on the input component, more or less.
I think https://github.com/carbon-design-system/carbon/pull/7777 is a good example to do so.
This ticket should be closed once we will implement this by default, and remove getComboboxProps from useCombobox.
Do we have an estimate as to when we can expect support for Aria 1.2?
I am working on the estimates, but for now please use the aggregated getComoboxProps and getInputProps to work around and put everything on the input element. Will also update useSelect to match 1.2 ARIA, so we are up to date!
https://github.com/downshift-js/downshift/issues/1365