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

aria-describedby connected to fieldset is not supported by screen readers #2386

Closed
Febakke opened this issue Sep 6, 2024 · 2 comments · Fixed by #2705
Closed

aria-describedby connected to fieldset is not supported by screen readers #2386

Febakke opened this issue Sep 6, 2024 · 2 comments · Fixed by #2705
Assignees
Labels
♿️ accessibility Issues related to accessibility

Comments

@Febakke
Copy link
Member

Febakke commented Sep 6, 2024

When adding a description on fieldset, radiogroup, checkboxgroup it is added to the fieldset element using an aria-describedby. This is not standard HTML, and not well supported by browsers/screen readers.

Firefox and chrome/VoiceOver: Ignores description
Safari/VoiceOver: Overwrites all aria-descibedby inside the fieldset.

NVDA/chrome: Works as excpected

We have not yet tested with JAWS

Image

@Febakke Febakke converted this from a draft issue Sep 6, 2024
@Febakke Febakke added the ♿️ accessibility Issues related to accessibility label Sep 6, 2024
@Febakke Febakke changed the title Description inside fieldset is not supported by screen readers aria-describedby connected to fieldset is not supported by screen readers Sep 6, 2024
@mimarz
Copy link
Collaborator

mimarz commented Sep 9, 2024

Relevant issue which is the basis for todays implementation: #519

@eirikbacker
Copy link
Contributor

eirikbacker commented Sep 10, 2024

W3C actually mentions themselves that aria-describedby should not be used on non-interactive elements: https://www.w3.org/TR/using-aria/#label-support

I a fieldset has a related error message, the aria-describedby be set to all child inputs and point to the same message component. Note that the error message ID should then be placed before the ID pointing to the inputs individual description (aria-describedby="id-of-fieldset-error id-of-input-description" is well supported)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
♿️ accessibility Issues related to accessibility
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

4 participants