Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a11y problems with validation error messages generated by Bootstrap form_for #147

Merged
merged 1 commit into from
Mar 11, 2023

Conversation

lpar
Copy link
Contributor

@lpar lpar commented Mar 10, 2023

What is being done in this PR?

This fixes the accessibility issue described in #146

What are the main choices made to get to this solution?

It doesn't seem to be possible to work around the problem without changes to the tag code.

Hence the code was patched to generate unique IDs for the error messages, and associate them with the input field using aria-describedby.

In addition, the invalid field now has the aria-invalid attribute added.

List the manual test cases you've covered before sending this PR:

Test cases in form_for_test.go are updated.

Copy link
Member

@sio4 sio4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @lpar for the PR and for improving the module!

LGTM!

@sio4 sio4 merged commit b8072db into gobuffalo:main Mar 11, 2023
@sio4 sio4 self-assigned this Mar 11, 2023
@sio4 sio4 added the enhancement New feature or request label Mar 11, 2023
@sio4 sio4 added this to the v3.2 milestone Mar 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: Bootstrap form_for generates validation error messages that fail WCAG level A accessibility requirements
2 participants