select
select copied to clipboard
[accessibility] OptionList shows incorrect count during keyboard navigation.
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

Steps to reproduce
- Navigate to https://rc-select.react-component.vercel.app/?path=/story/rc-select--optionlabelprop
- Tab (or click) to input, to show options
- 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)
Have you come across any solution? @rynodivino
Hi @mrbrianhinton, unfortunately no