-
Notifications
You must be signed in to change notification settings - Fork 69
Front of House Page Structure A11y improvement #4653
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
base: master
Are you sure you want to change the base?
Conversation
a01e280
to
3e800e1
Compare
Task ListLandmarks
Headings
Other
NOTE |
Accessible Structure Syntax(this documentation to be added to A11y dev docs) LandmarksFollowing the W3C guidance on landmark regions, our landmarks will primarily use HTML sectioning, only including roles and / or aria labels where the HTML alone is not sufficient. 📋 Note: the structure of our current theme templates is such page content is all inside Page StructureBasicAll individual page content is within the
Pages with side content and on-page navigation (e.g. articles)📋 Note: Ideally, the side content (downloads, metadata etc) would be a complementary landmark and the table of contents would be a
Pages with filters and/or search results
Pages with a several different blocks of 'slot in' content, e.g. journal home pageConsider each block as to whether that would benefit from being a region, for example:
Landmark SyntaxClasses, IDs and etc may be included within these tags, only the landmark related syntax is shown. Where possible use Landmarks should be used sparingly. Header<header> ... </header> Nav<nav> ... </nav> ArticleCurrently we use this for article content on the articles page only. 📋 In future we should consider using article landmarks for other content, e.g. news items. <article> ... </article> Aside📋 Currently we are not using Aside as a landmark, because this only works at top level, and our template structure places the whole template inside main, meaning any content inside a template is within the main landmark. SectionLandmarks should be used sparingly, and most sections are not landmarks. Including an aria-label / labelledby defines this as a landmark. Where a section is expected to form a distinct part of a multisection page, a landmark should be considered, where it covers content that would be considered 'main' it should not be distinguised from the main landmark. For example, use a landmark section for areas of the homepage (news, current issue etc), but do not use it for the 404 message on a page-not-found as this is the main content of that page. <section aria-labelledby="id_of_heading_of_this_section"> ... </section> Footer<footer> ... </footer> HeadingsGeneralAll pages should start with an H1. <h1> Heading that sets context for whole page </h1> 📋 Note: on some pages, this interrupts the visual flow - and the context of the page is clear from other visual cues, e.g. the contact us page. Redesigning the page layout to incorporate a top level heading is beyond scope, so in these cases, provide the H1 for screen readers only. <h1 class="sr-only"> invisible heading text to provide alternative to visual context of whole page </h1> Where a heading is inside logic, and is either the H1, or is likely to have subheadings, there should be an 'else' to provide a fallback heading. ModalsModals start with an Homepage
Each homepage-element should be in a section and have an Article Page📋 This is a compromise that balances improved accessibility against fundamental changes to the layout and display.
Nested TemplatesThere are a handful of templates on each theme which are nested within other templates at differing levels, such that the headings within these templates need to be at differing levels too. This is achieved by passing a 'level' variable in the include. Example Logic
Clean
Material
OLH
Note: I initially passed in the numerical value - but as this needed to be passed on to lower templates, this would have required incrementing, or would have meant that sometimes receiving a HR - Dividing linessee
All of our current Front of House Where an 📋 Note: in future designs, we will consider including decorative lines within the |
7e8a2d5
to
2318e43
Compare
Material Table of ContentsThe table of contents for material ( |
News BylinesPreviously, news bylines were mostly News TagsWhere a heading only contains dynamic content such that it could be empty, I have included logic so that the heading does not show when empty - this particularly relates to tags for news items - where not all themes removed the |
This comment was marked as outdated.
This comment was marked as outdated.
be35313
to
e98f7f5
Compare
Notes - Templates to check are still in use / find
|
3946b0b
to
f878b28
Compare
f878b28
to
a0d0686
Compare
a0d0686
to
83f8777
Compare
plan after discussion with @ajrbyers This work touches most of the Front of House templates, which are going to have further work on them during the 1.9. It will also need careful consideration of how changes to headings could impact custom styling etc. This PR is for 1.9 not 1.8. It underpins much of the work in 1.9, and so should be merged before that work begins, but not until after 1.8 is cut. |
closes #4232
addresses some of #4482