a11y: add skip to content link (#76470)
gitea/gadjo/pipeline/head This commit looks good Details

This commit is contained in:
Frédéric Péters 2023-04-10 13:25:47 +02:00
parent e2a1d668a5
commit 76423b24c2
2 changed files with 28 additions and 0 deletions

View File

@ -1375,6 +1375,29 @@ body .leaflet-attribution-flag {
white-space: pre-line;
}
#nav-skip {
position: absolute;
ul, li {
list-style: none;
margin: 0;
padding: 0;
display: flex;
}
a {
position: absolute;
line-height: calc(#{$header-height} - 20px);
height: calc(#{$header-height} - 20px);
top: 4px;
left: calc(#{$sidepage-width} + 60px);
width: 20rem;
z-index: 1000;
@extend %button;
}
a:not(:focus) {
@extend .sr-only;
}
}
@import 'grid';
@import 'fx-grid';
@import 'jqueryui';

View File

@ -24,6 +24,11 @@
{% endblock %}
</head>
<body data-gadjo="true" {% block bodyargs %}{% endblock %}>
<div id="nav-skip">
<ul>
<li><a href="#main-content">{% trans "Go to content" %}</a></li>
</ul>
</div>
<div id="top">
{% block sidepage %}
{% endblock %}