downshift icon indicating copy to clipboard operation
downshift copied to clipboard

Aria 1.2 support for useCombobox

Open gptt916 opened this issue 4 years ago • 7 comments

  • downshift version: 6.0.6
  • node version: 14.15
  • npm (or yarn) 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?

gptt916 avatar Feb 17 '21 16:02 gptt916

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.

silviuaavram avatar Feb 23 '21 14:02 silviuaavram

Note that ARIA 1.2 reached W3C Candidate Recommendation status today.

carmacleod avatar Mar 03 '21 00:03 carmacleod

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

silviuaavram avatar Mar 09 '21 07:03 silviuaavram

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.

carmacleod avatar Mar 09 '21 15:03 carmacleod

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.

silviuaavram avatar Mar 24 '21 17:03 silviuaavram

Do we have an estimate as to when we can expect support for Aria 1.2?

OlliNie avatar Oct 11 '21 08:10 OlliNie

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

silviuaavram avatar Mar 07 '22 15:03 silviuaavram