select icon indicating copy to clipboard operation
select copied to clipboard

[accessibility] OptionList shows incorrect count during keyboard navigation.

Open rynodivino opened this issue 3 years ago • 2 comments

Description

When using the keyboard to traverse an optionlist, the length of the list is always restricted to 3 or less. I think it's related to this: https://github.com/react-component/select/blob/master/src/OptionList.tsx#L255-L257

The only thing rendered is the current active plus next and previous items. Nice way to keep things light for sure, but it would be nice if there is a way to convey the length of the options to the screenreader correctly.

I also noticed issues #473 and #474, but did not see any mention of this specific issue in either (unless i just missed the essence of those issues).

Screenshot

rc-select-a11y

Steps to reproduce

  1. Navigate to https://rc-select.react-component.vercel.app/?path=/story/rc-select--optionlabelprop
  2. Tab (or click) to input, to show options
  3. Use arrow keys to cycle through the list

Expected behavior

The screenreader should announce each option item's value, selected state, and position in the list (i.e. 9 not selected 9 of 9)

Actual behavior

The option's position in the list is always restricted to a count of 3 or less (i.e. 9 not selected 2 of 3)

rynodivino avatar Jan 13 '22 22:01 rynodivino

Have you come across any solution? @rynodivino

briannhinton avatar May 04 '22 15:05 briannhinton

Hi @mrbrianhinton, unfortunately no

rynodivino avatar Jul 25 '22 17:07 rynodivino