-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Rework the admin UI’s landmark based on established best practices #5411
Comments
Current structure is basically
What if we did the following;
And we put the actual root elements in the skeleton so that they are in one place and not in each sub-template? (although, this makes it a bit harder to find things maybe). wagtail/admin/templates/wagtailadmin/skeleton.html <a class="skiplink button" href="#main" data-skiplink>{% trans 'Skip to main content' %}</a>
<div class="wrapper">
{% block furniture %}
<nav id="nav">{% block navigation %}{% endblock %}</nav>
<header class="header" id="header">{% block header %}{% endblock %}</header>
<main class="content-wrapper" id="main">
{% block messages %}{% endblock %}
{% block main %}{% endblock %}
</main>
{% block footer %}{% endblock %}
{% endblock %}
</div> wagtail/admin/templates/wagtailadmin/base.html
|
Dom structure above based on https://www.w3.org/WAI/tutorials/page-structure/regions/ |
As part of #5275, we’ve introduced more ARIA landmarks across the CMS admin (
<main>
, and more). Axe is now reporting issues with those new landmarks:main
landmark for the 404 page)These first 2 warnings are because the
main
wraps both the page’s main content, as well as areas designated as header and footer:I’m not entirely sure which course to follow here – whether
main
should be right afterheader
, andfooter
right aftermain
, or whether we would want to remove some or all of those landmarks. Thoughts welcome! Tagging this as "enhancement" because Axe classifies this as a best practice rather than an accessibility compliance failure, and I’m not entirely sure of the impact on screen readers myself.Relevant: #5275, #5406.
The text was updated successfully, but these errors were encountered: