mirror of
https://github.com/readthedocs/sphinx_rtd_theme.git
synced 2025-02-25 18:55:21 -06:00
Fix aria label (#1056)
* Do not use the landmark role as part of the label See https://www.w3.org/TR/wai-aria-practices/#general-principles-of-landmark-design * translate aria-labels
This commit is contained in:
parent
3ed52c4df5
commit
c8ef0fc94f
2
docs/_templates/layout.html
vendored
2
docs/_templates/layout.html
vendored
@ -10,7 +10,7 @@ Docs. This is for local testing purposes only.
|
||||
|
||||
{% block footer %}
|
||||
{% if not READTHEDOCS %}
|
||||
<div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="versions">
|
||||
<div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="{{ _('Versions') }}">
|
||||
<span class="rst-current-version" data-toggle="rst-current-version">
|
||||
<span class="fa fa-book"> Read the Docs</span>
|
||||
v: latest
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
{% set display_vcs_links = display_vcs_links if display_vcs_links is defined else True %}
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
<div role="navigation" aria-label="{{ _('Breadcrumbs') }}">
|
||||
|
||||
<ul class="wy-breadcrumbs">
|
||||
{% block breadcrumbs %}
|
||||
@ -71,7 +71,7 @@
|
||||
</ul>
|
||||
|
||||
{% if (theme_prev_next_buttons_location == 'top' or theme_prev_next_buttons_location == 'both') and (next or prev) %}
|
||||
<div class="rst-breadcrumbs-buttons" role="navigation" aria-label="breadcrumb navigation">
|
||||
<div class="rst-breadcrumbs-buttons" role="navigation" aria-label="{{ _('Breadcrumbs') }}">
|
||||
{% if prev %}
|
||||
<a href="{{ prev.link|e }}" class="btn btn-neutral float-left" title="{{ prev.title|striptags|e }}" accesskey="p"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> {{ _('Previous') }}</a>
|
||||
{% endif %}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<footer>
|
||||
{%- if (theme_prev_next_buttons_location == 'bottom' or theme_prev_next_buttons_location == 'both') and (next or prev) %}
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="{{ _('Footer') }}">
|
||||
{%- if prev %}
|
||||
<a href="{{ prev.link|e }}" class="btn btn-neutral float-left" title="{{ prev.title|striptags|e }}" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> {{ _('Previous') }}</a>
|
||||
{%- endif %}
|
||||
|
@ -153,7 +153,7 @@
|
||||
</div>
|
||||
|
||||
{% block navigation %}
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="{{ _('Main') }}">
|
||||
{% block menu %}
|
||||
{#
|
||||
The singlehtml builder doesn't handle this toctree call when the
|
||||
@ -180,7 +180,7 @@
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
{# MOBILE NAV, TRIGGLES SIDE NAV ON TOGGLE #}
|
||||
<nav class="wy-nav-top" aria-label="top navigation">
|
||||
<nav class="wy-nav-top" aria-label="{{ _('Top') }}">
|
||||
{% block mobile_nav %}
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="{{ pathto(master_doc) }}">{{ project }}</a>
|
||||
|
@ -1,6 +1,6 @@
|
||||
{% if READTHEDOCS %}
|
||||
{# Add rst-badge after rst-versions for small badge style. #}
|
||||
<div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="versions">
|
||||
<div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="{{ _('Versions') }}">
|
||||
<span class="rst-current-version" data-toggle="rst-current-version">
|
||||
<span class="fa fa-book"> Read the Docs</span>
|
||||
v: {{ current_version }}
|
||||
|
Loading…
Reference in New Issue
Block a user