You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an InputTag in a form_for block fails validation, divWrapper in form/bootstrap/common.go generates one or more div elements under the input element, to contain the error. For example:
Description
Description
When an
InputTag
in aform_for
block fails validation,divWrapper
inform/bootstrap/common.go
generates one or morediv
elements under theinput
element, to contain the error. For example:Unfortunately, there is nothing to associate the
div
with theinput
to tell a screenreader that it's an associated error message.Expected Behavior
The error messages should have unique
id
values, andaria-describedby
on theinput
should be a list of the IDs of the error messages.In addition, it's a good idea to set
aria-invalid="true"
on fields which have data that has failed validation.Actual Behavior
Error messages fail WCAG level A accessibility checks.
To Reproduce
No response
Additional Context
Description of how to identify validation errors accessibly:
https://holistica11y.com/wcag-3-3-1-error-identification-level-a/
Note about setting
aria-invalid
even though not strictly required:https://www.w3.org/WAI/WCAG21/Techniques/aria/ARIA21
The text was updated successfully, but these errors were encountered: