-
Notifications
You must be signed in to change notification settings - Fork 13
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
refactor(sbb-select): avoid to move the the trigger element (combobox) to the light DOM #3153
Comments
A test has been done with the following actions:
Using Voiceover, it sometimes reads the full element, like label, placeholder, combobox etc, and sometimes it skips the first two and it announces only the combobox. However, when the panel is open in Lyne, the screenreader never reads the options when they are selected via arrow, while it does on the compared library. |
Thanks for the investigation! Thinking out loud here; Could we adopt this logic for sbb-select, but keep the other logic for sbb-autocomplete (etc.)? From my understanding, the necessary logic can be handle by the respective parent of sbb-option instances? |
I'm not sure I understood @kyubisation suggestion, but another negative aspect of not using the 'active-descendant' approach is that we would lose some a11y reading features (like the "1 of n" on the option and the grouping). The ideal solution would be to separate the trigger from the "select menu". This way, the focusable element would be in the light-dom and the screen readers should still be able to handle the grouping. <sbb-form-field>
<sbb-select-input role="combobox" ... />
</sbb-form-field>
<sbb-select-menu>
...
</sbb-select-menu> |
I would like to avoid separating into two different elements as our current html API is aligned with the upcoming select feature: https://developer.chrome.com/blog/rfc-customizable-select |
Fair point 😐 |
I thought I answered this but maybe I didn't click on comment after writing the message: |
To allow screen readers to properly interpret the state of our select component, we had to create an invisible focusable element in the light dom, which serves as the combobox role.
The idea is to follow the material WC select aria structure that apparently works without any light dom element.
The text was updated successfully, but these errors were encountered: