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

Remove redundant explicit role attributes from HTML5 elements #4708

Closed
2 tasks done
36degrees opened this issue Jan 31, 2024 · 0 comments · Fixed by #4854
Closed
2 tasks done

Remove redundant explicit role attributes from HTML5 elements #4708

36degrees opened this issue Jan 31, 2024 · 0 comments · Fixed by #4854
Assignees
Labels
awaiting triage Needs triaging by team

Comments

@36degrees
Copy link
Contributor

36degrees commented Jan 31, 2024

What

Remove the explicit role attribute on HTML elements that have the same role implicitly, including:

  • the <header> element in the Header component, which has a banner role
  • the <footer> element in the Footer component, which has a contentinfo role
  • the <nav> element in the Pagination component, which has a navigation role

In some places we include an explicit group role on <fieldset> elements (e.g. the date input) to ensure that JAWS announces the accessible description – we should leave this in place unless we're able to do further investigation and understand whether this is still needed.

Update our HTML validation rules accordingly.

Why

These have historically been set because older browsers (noteably Internet Explorer) do not map these implicit roles correctly.

As our browser support model has evolved, we can now remove these implicit roles.

Who needs to work on this

Developers

Who needs to review this

Developers, Accessibility Specialist

Done when

  • We are no longer adding redundant role attributes to elements that have the same implicit role (except <fieldset>)
  • HTML validation rules are updated to reflect this change
@36degrees 36degrees added the awaiting triage Needs triaging by team label Jan 31, 2024
@36degrees 36degrees moved this to Backlog 🏃🏼‍♀️ in GOV.UK Design System cycle board Feb 22, 2024
@querkmachine querkmachine self-assigned this Mar 12, 2024
@querkmachine querkmachine moved this from Backlog 🏃🏼‍♀️ to In progress 📝 in GOV.UK Design System cycle board Mar 12, 2024
@querkmachine querkmachine moved this from In progress 📝 to Needs review 🔍 in GOV.UK Design System cycle board Mar 12, 2024
@36degrees 36degrees moved this from Needs review 🔍 to Ready to release 🚀 in GOV.UK Design System cycle board Mar 18, 2024
@36degrees 36degrees moved this from Ready to release 🚀 to Done 🏁 in GOV.UK Design System cycle board Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting triage Needs triaging by team
Projects
Development

Successfully merging a pull request may close this issue.

2 participants