Repository navigation
fix(admin): label the allowed groups from the visible heading - #76
Open
karl-bullock wants to merge 2 commits into
Open
karl-bullock wants to merge 2 commits into
karl-bullock wants to merge 2 commits into
Conversation
The group container carried aria-label with a copy of the field heading, while the visible <label> had no `for`. Screen readers announced the heading twice and the label element was never associated with the control it names. The heading now has an id and the container is labelled by it, next to the aria-describedby that already points at the help text.
Includes transpiled JS/TS, and Typescript declaration files (typings).
Member
Author
|
Follow-up stacked on #72, one commit ( What to look at:
|
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.
Summary
The "Allowed user groups" block announced its heading twice: the container carried
aria-labelwith a copy of the field heading, while the visible<label>had noforand named nothing.The heading now carries an id and the group container is labelled by it (
aria-labelledby), alongside thearia-describedbythat already points at the help text. Screen readers announce the heading once and from the real element.Follow-up to #72, branch built on it.
Changes
js/src/admin/components/CategoryEditorModal.tsx: secondgenerateElementId()for the label,aria-labelledbyinstead ofaria-label,role="group"andaria-describedbyunchanged.js/distrebuilt.Checks
npm run check-typings,npm run format-check,npm run build: clean.role="group",aria-labelledby→ the<label>id,aria-describedby→ the help div id.