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

Fieldsets: Legend element is outside the fieldset #1961

Closed
contolini opened this issue Apr 24, 2024 · 3 comments
Closed

Fieldsets: Legend element is outside the fieldset #1961

contolini opened this issue Apr 24, 2024 · 3 comments
Labels

Comments

@contolini
Copy link
Member

Our recommended fieldset pattern involves a <legend> element outside the <fieldset> element. This is invalid, the legend needs to be a child of the fieldset.

See https://validator.w3.org/nu/?doc=https%3A%2F%2Fcfpb.github.io%2Fdesign-system%2Fcomponents%2Ffieldsets

image
@contolini contolini added the a11y label Apr 24, 2024
@sonnakim
Copy link
Member

We should fix this. There may be consequences to this depending on whether we depend on the current <legend> structure. I'll add it to our internal backlog.

@sonnakim
Copy link
Member

This needs investigation to see if we are depending in some way on this broken pattern, and if we are, refactoring so that the pattern is both accessible and works as intended. @anselmbradford will look at this next sprint

@anselmbradford
Copy link
Member

PR --> #2009

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants