Repository navigation
Conversation
…rolled listbox; Focused option is announced using aria-activedescendant;
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this do?
It exposes dropdown menu as an ARIA combobox (https://www.w3.org/WAI/ARIA/apg/patterns/combobox/) associated with a listbox. The currently focused option is announced using
aria-activedescendant.The changes are:
DropdownMenuInputgetsrole="combobox",aria-haspopup="listbox",aria-expandedandaria-controlsMenuaccepts anidprop and<ul role="listbox">gets that id. Each<li role="option">gets a derived${id}-option-${index}id andaria-disabledwhen disabled. The listbox setsaria-activedescendantto the focused option. Both// TODO: ARIAcomments are resolved.FilteringDropdownMenuInputaddsaria-autocomplete="list"and marks the "N matches found" header as status, so that it is also announced.QuickSearchInputgives fixed ids.Why are we doing this? (with JIRA link)
https://collectionspace.atlassian.net/browse/DRYD-1341. The accessibility audit found that the custom select in the header has no role or state and that its options are not announced by screen readers (WCAG 4.1.2 Name, Role, Value). This applies the ARIA combobox pattern, one of the fixes Deque recommended.
How should this be tested? Do these changes have associated tests?
Manual test with a screen reader like macOS VoiceOver.
In cspace-ui.js, update your package.json to use this version of cspace-input, e.g.
"cspace-input": "file:../cspace-input.js",Dependencies for merging? Releasing to production?
After merging a new release should be published
Has the application documentation been updated for these changes?
Changelog has been updated
Did someone actually run this code to verify it works?
@spirosdi ran it locally against core.dev