[wp-trac] [WordPress Trac] #41859: Add aria-current to the paginated posts links output by wp_link_pages()

WordPress Trac noreply at wordpress.org
Mon Sep 11 21:17:57 UTC 2017


#41859: Add aria-current to the paginated posts links output by wp_link_pages()
---------------------------+-----------------------------
 Reporter:  afercia        |      Owner:
     Type:  defect (bug)   |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  Themes         |    Version:
 Severity:  normal         |   Keywords:  aria-current
  Focuses:  accessibility  |
---------------------------+-----------------------------
 When using the `<!--nextpage-->` tag one or multiple times in post,
 `wp_link_pages()` generates pagination links for the post. In the set of
 pagination links, `aria-current` would help assistive technologies users
 orientate themselves and understand which the current active "page" is.

 See also #40833 that introduced aria-current for in `paginate_links()`,
 typically used on archive pages for posts navigation.

 The actual links markup gets generated by `_wp_link_page()`. Worth noting
 this markup could be improved also for other things, for example there's
 no "current" CSS class used on the active paeg number.

 Themes usually add their own markup around the links to improve things a
 bit. For example, Twenty Seventeen uses this:

 {{{
 wp_link_pages( array(
         'before'      => '<div class="page-links">' . __( 'Pages:',
 'twentyseventeen' ),
         'after'       => '</div>',
         'link_before' => '<span class="page-number">',
         'link_after'  => '</span>',
 ) );
 }}}

 However, some improvements to the default output would be a nice
 improvement.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/41859>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list