-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Screen reader read's selected value as 'blank' #1585
Comments
I also was looking into this issue and thought it was related to |
What is the status of the issue? |
As a workaround I append the selected Option to the aria-label. The tricky part is, that now the screen reader (NVDA) will still read the old value when the user selects a new value. As solution to this problem, I don't append the selected Option to the aria-label while the select menu is open. <ReactSelect
aria-label={'My Label' + (this.state.isOpen ? ` Option ${selectedOptionLabel} is selected` : '')}
onMenuOpen={() => this.setState({isOpen: true})}
onMenuClose={() => this.setState({isOpen: false})}
// ...
/> I'm not sure whether this is a good solution, but at least the screen reader now get's information about the selected option. |
Greetings and apologies for the long delay in a response from the collaboration team. I noticed that this is a screenshot from v1 and was wondering if this is still an issue for v2 or v3? I am uncertain what accessibility strategy was used at the time, but for now, aria-live is being used for a11y.
I want us to be able to address accessibility in an intelligent way, and for now that focus is on aria-live for v3.3, but we will continue to look into ways to support WIA-ARIA following that to ensure that we are not introducing conflicts related to competing audio cues. I will be marking this as |
As an update, I have spent a bit more time with the aria-live implementation. This is indeed an issue that I have documented and added as a to-do as part of all known aria-live issues in #4414 |
I've been investigating this issue (using the latest 4.1 version) and I believe the reason NVDA (and perhaps other readers too) reads "blank" is because the input field is focused all the time. Once the menu is opened the input field should not yield focus, the menu should be focused instead. The accessibility of the menu, options and input field would also be greatly improved if the following aria attributes would be added together with the focus change:
There is quite a good post on the topic of accessible autocomplete at https://adamsilver.io/blog/building-an-accessible-autocomplete-control/. I was trying to workaround the focus input issue using custom component but so far have not been successful. |
Thanks @skippone Please correct me if I am wrong, but my experience with VoiceOver is that "blank" is read as the value, because the input is empty which is the built in accessibility support for autocomplete=list. Implementing this with aria-live, allows more flexibility as the control can read back instructions along with the currently selected value(s) - which is likely a behavior I will be looking into implementing into the PR this weekend. I am working on a PR currently to shore up some of the loose ends regarding the aria-live implementation #4414 and then follow back around to the aria-roles so that we can understand where there might be conflicts to allow more granular control to allow users to turn one or the other off to avoid redundant information. This especially becomes important as adding more attributes adds potentially more "noise" (figuratively and literally). Regarding focus control, I am not sure I understand this...
...though I interpret it to mean that the input should yield focus. Unfortunately, it's not an arbitrary task to say "give focus to the menu" as much of the internal functionality is tied to focus/blur methods on the input. This is not to say what is the correct approach but that it would require a larger rewrite to accomplish this. Additionally, I would welcome any further testing of my PR branch especially by those with NVDA or JAWS. Thank you much for the link, and will take some time to dig deeper into it when I get some time. |
I tested Material-UI's implementation of their Autocomplete component, to see if Windows/NVDA had the same issue: it does not. https://material-ui.com/components/autocomplete/ I would have guessed it would have a similar problem, seeing that there is an input field, and it remains "blank". At first glance, it appears as though a significant difference could be that Material UI's component includes If you'd like I could draft a PR, which I imagine could fix this. |
@bozdoz Thank you much for doing the research on this. I'll bring this up on our weekly call tonight and get back to you on this. I think this would be a big win. My concern with using the focusedOption is that it may not be focused especially in cases where the select is async or in most cases when data options are still being retrieved. Perhaps better is to use the SingleValue and MultiValue as the descendant element? If this were the case, we'd likely want to address this in the accessibility section for custom Value components or when the user sets |
Hello, |
yaa i agree with mks1948, this problem exists on their docs too. screen reader is not reading the options. |
We have a developer dedicated to accessibility that will be digging into this more deeply. What has slowed this examination was the issues introduced in V4 by upgrading to Emotion 11 which did not play nice with apps built with components using Emotion 10 - which was the case for the platform Sean was using in his development environment. Now with V5 going into beta (today - fingers crossed) we can begin to look into these accessibility issues more in depth. |
Hi, |
I was able to fix this by using the
|
@ebonow what is the current direction towards solving this issue? Is it decided that react-select should follow w3 recommendations? Are you committed instead to customizing live regions and making screenreaders more explicit? Are you open at the moment to accepting PR's for this matter? If so, what change would you expect? |
Hi there,
I am noticing that a screen reader (NVDA and WIndows 10 Narrator) is unable to read the selected value in the react-select field. NVDA will read it as 'blank' (see screenshot below).
To reproduce using NVDA screen reader:
Any suggestions on how to rectify this so that screen readers can read the value selected in the react-select field?
Thanks and Regards,
Eric
The text was updated successfully, but these errors were encountered: