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

Read More link text must be unique #2709

Closed
1 task
ivanteoh opened this issue Apr 4, 2017 · 4 comments
Closed
1 task

Read More link text must be unique #2709

ivanteoh opened this issue Apr 4, 2017 · 4 comments

Comments

@ivanteoh
Copy link
Member

ivanteoh commented Apr 4, 2017

Environment (if reporting a bug)

Python Version: All Python version

Nikola Version: v7.8.3

Operating System: All operating system

Description:

Current Read More link text is not unique on the index page.

It fails accessibility report. More info at https://fae.disability.illinois.edu/rulesets/LINK_2/.

Option solutions:

  • give more tags for generating unique link text. For example, post title.

    nikola/nikola/post.py

    Lines 690 to 697 in 3835c95

    teaser += l.format(
    link=self.permalink(lang, query=feed_links_append_query),
    read_more=teaser_text,
    min_remaining_read=self.messages[lang]["%d min remaining to read"] % (self.remaining_reading_time),
    reading_time=self.reading_time,
    remaining_reading_time=self.remaining_reading_time,
    paragraph_count=self.paragraph_count,
    remaining_paragraph_count=self.remaining_paragraph_count)

Any more suggestions?

@Kwpolska
Copy link
Member

Kwpolska commented Apr 4, 2017

Add a title tag to those anchors if you really need it. In my opinion, it makes no sense whatsoever.

@ivanteoh
Copy link
Member Author

ivanteoh commented Apr 5, 2017

@Kwpolska where to get title tag value? Currently, INDEX_READ_MORE_LINK = '<p class="more"><a href="{link}">{read_more}…</a></p>' If I want to add title tag, the html code will be <p class="more"><a title="{post_title}" href="{link}">{read_more}…</a></p>'. So I need more tags, or that is another way to get post title without introduce more tags? Thanks.

@Kwpolska
Copy link
Member

Kwpolska commented Apr 5, 2017

This would require modifying the codebase. master now supports {post_title}.

@ivanteoh
Copy link
Member Author

ivanteoh commented Apr 7, 2017

@Kwpolska, great and 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

No branches or pull requests

2 participants