wcag - skip nav link

This commit is contained in:
rimu 2024-01-23 17:16:49 +13:00
parent 1de72f5ab4
commit bc63e773e1
3 changed files with 25 additions and 1 deletions

View file

@ -1034,4 +1034,16 @@ fieldset legend {
padding-top: 0; padding-top: 0;
} }
.skip-link {
position: absolute;
top: -40px;
left: 0;
background-color: #fff;
z-index: 999;
}
.skip-link:focus {
top: 0;
}
/*# sourceMappingURL=structure.css.map */ /*# sourceMappingURL=structure.css.map */

View file

@ -705,3 +705,14 @@ fieldset {
.list-group-item:first-child { .list-group-item:first-child {
padding-top: 0; padding-top: 0;
} }
.skip-link {
position: absolute;
top: -40px;
left: 0;
background-color: #fff;
z-index: 999;
}
.skip-link:focus {
top: 0;
}

View file

@ -91,6 +91,7 @@
{% endblock %} {% endblock %}
</head> </head>
<body class="d-flex flex-column{{ ' low_bandwidth' if low_bandwidth }}"> <body class="d-flex flex-column{{ ' low_bandwidth' if low_bandwidth }}">
<a href="#outer_container" class="skip-link" role="navigation" aria-label="Skip main navigation">Skip to main content</a>
<!-- Page content --> <!-- Page content -->
{% block navbar %} {% block navbar %}
<nav class="navbar navbar-expand-lg"> <nav class="navbar navbar-expand-lg">