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

♿ a11y(bal-field): wrong error message linked to inputs by aria-describedby #1528

Open
1 task done
zsofia-oroszi-ibmix opened this issue Nov 29, 2024 · 3 comments
Open
1 task done
Assignees
Labels
🐛 bug Something isn't working

Comments

@zsofia-oroszi-ibmix
Copy link

Description of this issue

When an error message is present, the same message is linked to each field (via aria-describedby). Therefore the screen reader announces an error message for each field.
Screenshot 2024-11-29 at 09 00 10

How to fix it

The aria-describedby attribute should reference the ID of the related bal-field-message, if one is present.

Code Reproduction URL

https://dev.author.baloise.magnolia-platform.io/webstyleguide-baloise-com/de/home/components/Form.html

Additional Information

To reproduce, please submit the form without any input, then navigate through the form by Tab with VO on, or inspect the aria-describedby values on each input.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@zsofia-oroszi-ibmix zsofia-oroszi-ibmix added the ✨ feature New feature or request label Nov 29, 2024
@hirsch88 hirsch88 added this to the ♿️ Accessibility milestone Nov 29, 2024
@hirsch88 hirsch88 assigned m4rc0z and unassigned hirsch88 Dec 5, 2024
@hirsch88 hirsch88 added 🐛 bug Something isn't working and removed ✨ feature New feature or request labels Dec 5, 2024
@m4rc0z
Copy link
Collaborator

m4rc0z commented Dec 5, 2024

Could you provide a stackblitz or something we can access about this? Its somehow not reproduceable for me.

@m4rc0z m4rc0z closed this as completed Dec 5, 2024
@zsofia-oroszi-ibmix
Copy link
Author

Hi @m4rc0z, the issue can be reproduced in Storybook too: https://design.baloise.dev/?path=/story/components-form-form--autocomplete&globals=framework:html
The inputs for "Street" and "City" have wrong message ids as aria-describedby values, therefore VO announces a message even though it's not present for these fields.
Screenshot 2024-12-12 at 08 12 06

@GinaBiondo-aperto
Copy link
Collaborator

See comment above :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants