-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR improves the Combobox because there are some differences compared to the Listbox that we didn't properly account for. Big thanks to @afercia for providing us with a wonderful issue report that talks about the differences. This commit fixes a few issues: - The `aria-selected` value was always based on the `selected` value (which is correct for the `Listbox`) but it should be based on the visually selected value (in our case, this is the `active` value). - We dropped an incorrect `aria-activedescendant` attribute from the `ComboboxOptions`, it should only exist on the `ComboboxInput`. - We added a missing `aria-autocomplete` to the `ComboboxInput`, with a value of `list` so that assistive technology better understands what kind of Combobox we are dealing with. - This also includes a VoiceOver bug fix where the announcements aren't properly happening unless a change to the `ComboboxInput` is made. Now we will trigger a change to the input when we open the `Combobox`, we will set the value to `''` and re-set to whatever value was present. We also make sure that the cursor position / selected range is reset so that the end user doesn't feel any differences (except for a better working VoiceOver on macOS). Fixes: #2129 Co-authored-by: Andrea Fercia <a.fercia@gmail.com>
- Loading branch information
1 parent
6fa6074
commit 8aec5ca
Showing
3 changed files
with
80 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters