-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add rel and rel HTML attributes to the footer links which point to th… #357
Conversation
…e previous and next pages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like a good addition. I think each button should only have one rel
though.
sphinx_rtd_theme/footer.html
Outdated
@@ -2,10 +2,10 @@ | |||
{% 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"> | |||
{% if next %} | |||
<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"></span></a> | |||
<a href="{{ next.link|e }}" class="btn btn-neutral float-right" title="{{ next.title|striptags|e }}" accesskey="n" rel="next" rev="prev">{{ _('Next') }} <span class="fa fa-arrow-circle-right"></span></a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should no be both next and prev, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should no be both next and prev, no?
I think you can use both. I found an example in the W3C HTML 5.1 Recommendation, but it uses the link element. I think it can be applied to the <a>
element the same way. Example taken from https://www.w3.org/TR/html51/document-metadata.html#the-link-element
Document with URL "chapter2.html"
<link href="chapter1.html" rel="prev" rev="next">
<link href="chapter3.html" rel="next" rev="prev">
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked it in the W3C Validator and found that apparently the rev attribute is obsolete. Though it is in the W3C HTML 5.1 Recommendation and there is no warning about that there.
The rev attribute on the a element is obsolete. Use the rel attribute instead, with a term having the opposite meaning.
OK, then I'll remove it.
Thanks! |
…e previous and next pages.