Closed NickColley closed 5 years ago
I've put awaiting-triage
on this since I think we should discuss if this issue is a mistake with how we implemented this review page, or something that we encourage by the design of the page template.
I have assigned this a low priority since this is not an issue with GOV.UK Frontend but our review application implementation.
We have decided to ignore this recommendation for now, as this doesn't appear to impact users and there doesn't appear to be anything in the spec that prevents <aside>
elements from appearing within <main>
elements.
The HTML 5.1 spec does say:
The main content area of a document includes content that is unique to that document and excludes content that is repeated across a set of documents such as site navigation links, copyright information, site logos and banners and search forms (unless the document or application’s main function is that of a search form).
– https://www.w3.org/TR/html51/grouping-content.html#elementdef-main
However we are using <aside>
elements for related links, which do have a semantic relationship to the content within <main>
and theoretically could be unique to each page.
(See also Example 40 in the spec, which shows an <aside>
within a <main>
, albeit for contextual prose)
We should revisit this decision if we find that this has a tangible impact on users.
(Note also that the pages on GOV.UK from which these examples are drawn do have the <main>
wrapped only around the two-thirds column. They also do not use an <aside>
, just a <nav>
)
This issue is from a May 2019 external accessibility audit report.
WCAG Reference: 4.1.1 Parsing (Level A) Issue ID: DAC_Issue15 URL: http://govuk-frontend-v3.herokuapp.com/full-page-examples/bank-holidays
Summary
The ‘aside’ landmark had been incorrectly placed within the
<main>
elementScreen Shot
The ‘aside’ landmark has been placed inside the ‘main’ element which is not semantic. This did not affect users, however.
Current Code Ref(s)
Solution
Ensure that all landmarks are nested correctly and that the ‘aside’ is placed outside of the ‘main’ element.