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

HTML validation error: "The button role is unnecessary for element button." #1588

Closed
hannalaakso opened this issue Sep 23, 2019 · 0 comments · Fixed by #1589
Closed

HTML validation error: "The button role is unnecessary for element button." #1588

hannalaakso opened this issue Sep 23, 2019 · 0 comments · Fixed by #1589

Comments

@hannalaakso
Copy link
Member

The header with navigation component sets role="button" on the menu button.

Our button component doesn’t set this attribute but the header button is hardcoded.

<button> is well supported so setting role is not useful here.

The W3C Markup Validator flags it as warning

The button role is unnecessary for element button.

We could also consider using our button macro here - if we decide to make it possible to override govuk-button class on the component since the header button won’t be requiring those styles.

@hannalaakso hannalaakso added the awaiting triage Needs triaging by team label Sep 23, 2019
@kellylee-gds kellylee-gds removed the awaiting triage Needs triaging by team label Oct 10, 2019
@36degrees 36degrees changed the title Remove role="button" from header button HTML validation error: "The button role is unnecessary for element button." Jul 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants