Skip to content

Commit 835b20c

Browse files
authored
Respect tab order for prev/next buttons (#1051)
This doesn't affect the display, it looks like before, but now the tab is order is correct.
1 parent 60e1c21 commit 835b20c

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

sphinx_rtd_theme/breadcrumbs.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,12 @@
7272

7373
{% if (theme_prev_next_buttons_location == 'top' or theme_prev_next_buttons_location == 'both') and (next or prev) %}
7474
<div class="rst-breadcrumbs-buttons" role="navigation" aria-label="breadcrumb navigation">
75-
{% if next %}
76-
<a href="{{ next.link|e }}" class="btn btn-neutral float-right" title="{{ next.title|striptags|e }}" accesskey="n">{{ _('Next') }} <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
77-
{% endif %}
7875
{% if prev %}
7976
<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>
8077
{% endif %}
78+
{% if next %}
79+
<a href="{{ next.link|e }}" class="btn btn-neutral float-right" title="{{ next.title|striptags|e }}" accesskey="n">{{ _('Next') }} <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
80+
{% endif %}
8181
</div>
8282
{% endif %}
8383
<hr/>

sphinx_rtd_theme/footer.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<footer>
22
{%- if (theme_prev_next_buttons_location == 'bottom' or theme_prev_next_buttons_location == 'both') and (next or prev) %}
33
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
4-
{%- if next %}
5-
<a href="{{ next.link|e }}" class="btn btn-neutral float-right" title="{{ next.title|striptags|e }}" accesskey="n" rel="next">{{ _('Next') }} <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
6-
{%- endif %}
74
{%- if prev %}
85
<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>
96
{%- endif %}
7+
{%- if next %}
8+
<a href="{{ next.link|e }}" class="btn btn-neutral float-right" title="{{ next.title|striptags|e }}" accesskey="n" rel="next">{{ _('Next') }} <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
9+
{%- endif %}
1010
</div>
1111
{%- endif %}
1212

0 commit comments

Comments
 (0)