-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Accessibility - screenreader announces "blank" while reading the opti…
…ons (#5758) * improved a11y with aria-attribules for input, select, and option * removed console.log * fixed focusableOptionsWithIds for async select * Improved the ariaLiveMessages to announce only important information that is not included into native aria messages * added tests for aria-activedescendant, fixed calculation of focusedOptionId in constructor * added changelog * restored some aria-live for apple device * option focus messages changed * moved listbox to inner div, aria-multiselectable added * tsconfig fix * prettier fix * removed redundant 'types' from tsconfig --------- Co-authored-by: Alina Andrieieva <Alina_Andrieieva@epam.com>
- Loading branch information
Showing
14 changed files
with
497 additions
and
80 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
'react-select': minor | ||
--- | ||
|
||
1. Added 'aria-activedescendant' for input and functionality to calculate it; | ||
2. Added role 'option' and 'aria-selected' for option; | ||
3. Added role 'listbox' for menu; | ||
4. Added tests for 'aria-activedescendant'; | ||
5. Changes in aria-live region: | ||
|
||
- the instructions how to use select will be announced only one time when user focuses the input for the first time. | ||
- instructions for menu or selected value will be announced only once after focusing them. | ||
- removed aria-live for focused option because currently with correct aria-attributes it will be announced by screenreader natively as well as the status of this option (active or disabled). | ||
- separated ariaContext into ariaFocused, ariaResults, ariaGuidance to avoid announcing redundant information and higlight only current change. |
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
Oops, something went wrong.