WordPress.org

Ready to get started?Download WordPress

Forums

Upgrade WordPress accessible (6 posts)

  1. CRIAI@Portici
    Member
    Posted 4 years ago #

    Hello everybody,
    I'd like to propose a change to the wordpress code in order to have the product in line with the WCAG directives for sites accessibility.
    The "get_the_content($more_link_text = nul, $stripteaser = 0, $more_file = '')" function within the "post-template.php" file, that can be used to generate code for the <!--more-->.
    As you all know a link to the page that contains the article is generated as you invoke that. Well, this link appears to be not that clear to me and it does not carry the "title" attribute, which is a must if you gotta use this kind of "assistive technologies".
    Thanks in advance.

  2. So ... You want to change the value of the text included in the 'more' link?

    See http://codex.wordpress.org/Customizing_the_Read_More

  3. CRIAI@Portici
    Member
    Posted 4 years ago #

    no I don't want to change the text, even if the simple one "READ More..." not from the significance of the link, but to enrich the code HTML with the attribute "TITLE" that it increases the accessibility of the link...

    for example:

    to the line 226 of the file "post-template.php"

    $output.= apply_filters ('the_content_more_link', < to href = ". get_permalink (). "#blackberries - $ id \ " class = \ "blackberry-link \" > $ more_link_text < /a >", $ more_link_text );

    Could be replaced with:

    $output.= apply_filters ('the_content_more_link', < to href = ". get_permalink (). "#blackberries - $ id \ " class = \ "blackberry-link \" title = \"Press here for knowing of more.. \" > $ more_link_text < /a >", $ more_link_text );

    I don't know if I have have the conceive...

  4. You could customize that with your own filters in your theme's functions.php (I know you can, I'm not sure of the methodology off the top of my head).

    This is actually specifically addressed as an example on how to make a plugin: http://www.boosten.org/a-primer-on-writing-wordpress-plugins/

    You could do the same in your functions :)

  5. Samuel Wood (Otto)
    Tech Ninja
    Posted 4 years ago #

    Adding a title to a link does not automatically make it more "accessible".

    If the link text itself makes sense as read, then a title is not necessary. The only benefit of a title is when the link text is out of place, or doesn't make sense as read.

    There's usually no need for a title tag, because the link text says "read more of this entry" or something similar.

  6. CRIAI@Portici
    Member
    Posted 4 years ago #

    Adding a title to a link does not automatically make it more "accessible".

    If the link text itself makes sense as read, then a title is not necessary. The only benefit of a title is when the link text is out of place, or doesn't make sense as read.

    There's usually no need for a title tag, because the link text says "read more of this entry" or something similar.

    you are perfectly right Otto42, the title he could contain the text "you open the page to know more on the article of it #name_article".

    this because of default in the link "<!--more-->" he is written "more...", obviously experienced people of php and wordpress can put hands to the code, but I have proposed him for those that use it but don't know the php, and want to be in line with the accessibility

    PS thanks Ipstenu

Topic Closed

This topic has been closed to new replies.

About this Topic