-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
Don't have any accessibility mode specific behavior of quickpick #176081
Comments
To @joanmarie and @LeonarddeR, @isidorn gave me your names to ask about ARIA. Here's the craziness I am trying to accomplish. I have: <div id="a" aria-live="polite"></div> and then under that (as child), I add in "randomly": <div id="b" aria-labelledby="list_item_0"></div> This causes the <div id="a" aria-live="polite"></div> and then adding My question is... it seems like the
|
I think you are expecting aria-live to work for something which is beyond its purpose. The role of the element with id ="list_item_0" is not announced because the purpose of aria-live regions is simply to announce changes in text content. In fact, for the fix you are trying to implement, there is no need for the role of the object to be announced. You are not trying to simulate a focus event. Think of it as announcing search suggestions instead. If the role was announced, screen reader users may be led to believe that keyboard focus is where it isn't.
Avoid nested divs with additional aria attributes which can lead to unexpected behavior. I'm actually surprised that your child div gets read at all. I suppose since it is an empty div that Chrome is calculating the accessible name based on aria-labelledby. You may want to apply an sr-only class to that div so that it is not visible.
|
@rperez030 your suggestion also works and is something I tried. My concern with all these options is that the role of the selected item in the quick pick is lost. If I want to mark that an item in the quick pick acts as a
I can't figure out the right way to have these requirements:
Please let me know if you have any ideas how to do this, otherwise I'll get almost there and use your simpler suggestion which gets us all of those bullets except for the last one. |
hi @TylerLeonhardt. I will comment on some of your points and suggest a simpler approach in the end.
Simpler approach: As @scottaohara mentioned to me in a side conversation we are having, all of this can be avoided simply by replacing the current accessible name of the widget "Quick Input" with the placeholder text. I don't remember if there was a reason not to do that in the first place. This will resolve the problem that started the entire thread, allow us to continue using aria-activedescendant and eliminate the need to have a screen reader optimized widget. The name "Quick Input" is not helpful anyway. The only inconvenient of this method is that we cannot track the activity in the edit field using a screen reader, but we couldn't do that with the previous behavior either. It is perhaps a smaller price to pay. We still could allow something like that if we can remove aria-activedescendant when shift +Tab is pressed, for example, and add it back if the user presses down arrow key or the Tab key. Does it make sense? |
Fixed in #179217 |
I just tried out the Quick Pick behaviour on Windows with NVDA and what you did feels good to me. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as abuse.
This comment was marked as abuse.
Related on Stack Overflow: Why isn't VS Code auto-focusing the first entry in the Quick Open list? |
This is due to changes in the previous iteration for the component. I'm surprised this was promoted to production. |
Right now, we depend on different behavior of the quick pick when using a screen reader so that the quick pick is accessible. However, the change we made last iteration to make it accessible, also made it less usable.
Lots of good info in this thread:
#166920 (comment)
The overarching problem is that a quick pick cannot have a placeholder and set active items at the same time because the placeholder must be read out by a screenreader to be accessible.
We should try out using
aria-live
instead ofaria-activedecendant
to make this work.The text was updated successfully, but these errors were encountered: