Skip to content
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

Merged
merged 2 commits into from
Mar 2, 2017

Conversation

jorgesumle
Copy link
Contributor

…e previous and next pages.

Copy link
Member

@ericholscher ericholscher left a 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.

@@ -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>
Copy link
Member

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?

Copy link
Contributor Author

@jorgesumle jorgesumle Feb 22, 2017

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">

Copy link
Contributor Author

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.

@ericholscher ericholscher merged commit a25e7e1 into readthedocs:master Mar 2, 2017
@ericholscher
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants