question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItĀ collects links to all the places you might be looking at while hunting down a tough bug.

And, if youā€™re still stuck at the end, weā€™re happy to hop on a call to see how we can help out.

Axe issue: "All page content must be contained by landmarks"

See original GitHub issue

Hello šŸ‘‹

Weā€™ve noticed for a while that prototype kit and GOV.UK Frontend examples keep the ā€œBackĀ linkā€ and ā€œPhaseĀ bannerā€ outside landmark regions.

i.e. Theyā€™re not in a <header>, <footer> or <main>.

This throws up moderate issues in axe: https://dequeuniversity.com/rules/axe/3.3/region?application=AxeChrome

Components not in <main> or <header>

This example shows showing both components outside regions:
http://govuk-frontend-review.herokuapp.com/full-page-examples/upload-your-photo

Components outside  main

But the ā€œBreadcrumbsā€ component is in <main>

This example shows breadcrumbs inside a region:
http://govuk-frontend-review.herokuapp.com/full-page-examples/renew-driving-licence

Breadcrumbs component inside  main

Hereā€™s what we see in the axe sidebar when follow the examples (with ā€œBackĀ linkā€ and ā€œPhaseĀ bannerā€ outside landmark regions):

Axe report

It would be great to see the research behind when to use a landmark or not.

Should this be logged under https://github.com/alphagov/govuk-frontend/issues/1280#issuecomment-509588851?

Thanks

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:16 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
36degreescommented, May 20, 2021

We should consider the skip link component as part of this issue, but worth noting that Deque themselves say:

It is best practice to contain all content excepting skip links, within distinct regions such as the header, nav, main, and footer.

1reaction
NickColleycommented, Oct 8, 2019

Just to clarify, the ā€˜govuk-frontend-reviewā€™ application is not intended to be guidance and contains intentionally legacy and therefore out of date patterns for test the ā€˜compatibility modeā€™.

So thatā€™s the reason why one of the examples in there is wrong.

In the official guidance on the Design System website we intentionally do not have the phase banner, back links, or breadcrumbs in the ā€˜mainā€™ element.

This is for two reasons I know of:

  • the skip link is less useful if it does not skip the phase banner, back links and breadcrumbs
  • too many navigation landmarks on GOV.UK have been reported to be an issue so we intentionally have removed some navigation landmarks in order to make it clear what the main navigation is.

I donā€™t have the original research for the latter decision, but will ask around and see if I can dig it up.

Will leave this in triage for us to decide as a team what direction we want to take, thanks a lot for raising this Iā€™m sure others will run into this too.

Read more comments on GitHub >

github_iconTop Results From Across the Web

All page content must be contained by landmarks | Axe Rules
Ensure all content is contained within a landmark region, designated with HTML5 landmark elements and/or ARIA landmark regions.
Read more >
All content must be contained in landmarks
Use the appropriate landmarks to identify the different regions of content on a web page. Ā· The most important landmark roles are main...
Read more >
How can we fix the A11y error "All page content must be ...
There is no problem with the root element being a <div> element. You probably have another <div> , <p> or some other non-landmark...
Read more >
Using ARIA landmarks to identify regions of a page - WCAG WG
It is a best practice to include ALL content on the page in landmarks, so that screen reader users who rely on them...
Read more >
Accessibility Check: v1.2.0 - ARIA Landmarks update
Before applying the update, these tools will display an error such as ā€œall content must be contained in landmarks.ā€ After applying the update,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found