Open selfthinker opened 1 year ago
Publication pages are always fine because they include a "Documents" h2 before the attachments' h3s. For example, https://www.gov.uk/government/statistics/learning-disability-services-monthly-statistics-commissioner-census-assuring-transformation-august-2015
@selfthinker I think this actually does affect publication pages too.
Looking at the example link you shared, the "Documents" heading is a H2 but so is the attachment title. They're both H2s rather than a H2 and a H3.
Looking at the example link you shared, the "Documents" heading is a H2 but so is the attachment title. They're both H2s rather than a H2 and a H3.
Interesting. That has changed since we wrote the original ticket (which was back in October 2022). Back then the heading for the document was an H3. Here is a version from October 2022.
So, yes, you're right. I'll amend the description accordingly.
What
When Whitehall block attachments or the attachment component are used, it can happen that the heading order on the page is wrong because the heading level for attachments is hard-coded.
Example URLs where the context makes the heading level wrong:
Publications used to be fine because they included a "Documents" h2 before the attachments' h3s. See this publication, for example. But that was changed at some point and now the same page has the same issue because the attachments' headings have changed to an H2.
Why
A correct heading hierarchy helps screen reader users understand the structure and relationship of content on a page.
More context
This was found in the 2022 WCAG audit of GOV.UK. It's an accessibility issue but not a WCAG fail. This issue is not entirely due to the publishing components as some of the markup is coming from Whitehall.