Skip to content

Commit e33ac7e

Browse files
committed
fix a11y issues
1 parent 8d4d394 commit e33ac7e

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

sphinx_rtd_theme/layout.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117
{# the master_doc variable was renamed to root_doc in Sphinx 4 (master_doc still exists in later Sphinx versions) #}
118118
{%- set _logo_url = logo_url|default(pathto('_static/' + (logo or ""), 1)) %}
119119
{%- set _root_doc = root_doc|default(master_doc) %}
120-
<a href="{{ pathto(_root_doc) }}"{% if not theme_logo_only %} class="icon icon-home"{% endif %}>
120+
<a href="{{ pathto(_root_doc) }}"{% if not theme_logo_only %} aria-label="Go to Homepage" class="icon icon-home"{% endif %}>
121121
{% if not theme_logo_only %}{{ project }}{% endif %}
122122
{%- if logo or logo_url %}
123123
<img src="{{ _logo_url }}" class="logo" alt="{{ _('Logo') }}"/>

sphinx_rtd_theme/static/js/theme.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/theme.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ function ThemeNav () {
114114
$('.wy-menu-vertical ul').not('.simple').siblings('a').each(function () {
115115
var link = $(this);
116116
expand =
117-
$('<button class="toctree-expand" title="Open/close menu"></button>');
117+
$('<button class="toctree-expand" title="Open/close menu" role="presentation"></button>');
118118
expand.on('click', function (ev) {
119119
self.toggleCurrent(link);
120120
ev.stopPropagation();

0 commit comments

Comments
 (0)