Associate form help text with form #485
Closed
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.
This is an alternative solution to #484.
What problem does the pull request solve?
Most groups of checkboxes and radio buttons within Elements have an additional introductory help text which isn't a hint. It's usually there to help less technical people understand that you can select multiple checkboxes, but can also be used for other purposes.
This associates that text with the form via
aria-describedby
to make it more accessible to assistive technologies like screen readers. Ideally this should be put into the legend instead, but that proves to be difficult (see #484).How has this been tested?
I tested in the most used screen reader and browser combination: VoiceOver in Safari on macOS, JAWS in IE 11 on Windows 10 and NVDA in Firefox on Windows 10. They don't necessarily say the help text under all circumstances but always under some circumstances (e.g. when down-arrowing vs tabbing).
What type of change is it?
Has the documentation been updated?
I'm not quite sure if this needs to be documented or not. We don't officially have the concept of a "form help text". (That's the name I gave it, that might need improving.) But I am aware of forms in the wild which use something similar. Where would a documentation fit? Maybe under "hint text" as that is related.