[wp-trac] [WordPress Trac] #24709: Customise link text in paginate_links() and paginate_comments_links() for accessibility

WordPress Trac noreply at wordpress.org
Tue Nov 26 19:28:49 UTC 2013


#24709: Customise link text in paginate_links() and paginate_comments_links() for
accessibility
----------------------------+------------------------------
 Reporter:  grahamarmfield  |       Owner:
     Type:  enhancement     |      Status:  new
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  Accessibility   |     Version:  3.5.2
 Severity:  normal          |  Resolution:
 Keywords:                  |
----------------------------+------------------------------

Comment (by grahamarmfield):

 Replying to [comment:1 pauldewouters]:
 > @grahamarmfield
 >
 > This is a first attempt at adding the `before_page_link` and
 `after_page_link` arguments to `paginate_links()`
 > I'll add a separate patch for `paginate_comments_links()`
 I have now tested the first patch on paginate_links() and unfortunately
 the patch doesn't quite do what I wanted it to do.

 The before and after text is added, but outside the actual link. For
 example I've set the before text to 'before ' and the after text to '
 after' and the end result for each link is:


 {{{
 before <a class='page-numbers'
 href='http://url/?page_id=18&paged=3'>3</a> after
 }}}

 In order to add the extra context text for screen readers the extra text
 needs to be inside the link - like this:

 {{{
 <a class='page-numbers' href='http://url/?page_id=18&paged=3'>before
 3 after</a>
 }}}

 Looking at the patch I think that should be fairly easy to rectify. I
 currently don't have the knowledge to create new patches (still learning)
 but it would be great if someone could just modify that first patch so I
 could give it another try.

 So far I haven't done any testing on the comments pagination patch. I'll
 have to work out how to test that one.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/24709#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list