[wp-trac] [WordPress Trac] #40833: Allow addition of aria-current="page" to current page element in paginate_links()

WordPress Trac noreply at wordpress.org
Fri Jun 9 16:54:00 UTC 2017


#40833: Allow addition of aria-current="page" to current page element in
paginate_links()
-------------------------------------+-------------------------------------
 Reporter:  GrahamArmfield           |       Owner:  afercia
     Type:  enhancement              |      Status:  assigned
 Priority:  normal                   |   Milestone:  4.8.1
Component:  Themes                   |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch has-           |     Focuses:  accessibility,
  screenshots aria-current           |  administration
-------------------------------------+-------------------------------------
Changes (by afercia):

 * keywords:  has-patch => has-patch has-screenshots aria-current
 * focuses:  accessibility => accessibility, administration
 * component:  General => Themes


Comment:

 Thanks @palmiak and #wcpl2017! Screenshots of a quick test with VoiceOver,
 using Twenty Seventeen:

 posts pagination:

 [[Image(https://cldup.com/2z4dO4MSJ4.png)]]

 comments pagination:

 [[Image(https://cldup.com/2EG7cGZX76.png)]]

 Maybe just a couple concerns worth some consideration:
 - the ARIA 1.1 spec seems to recommend to use aria-current on links within
 a set of pagination links, while here the element is a `<span>`; I guess
 it's okay since basically any element can indicate the "current thing" in
 a set of items
 - an interesting consideration is if a theme is already using some
 visually hidden text with the word "Current", it should preferably be
 removed to avoid duplicated information, see this comment: https://tink.uk
 /using-the-aria-current-attribute#comment-6674 so I guess this change
 should be well communicated to theme authors
 Any thoughts more than welcome.

 Here'e a non-exhaustive list of places where `paginate_links()` is used in
 core that should be checked:
 - posts pagination
 - comments pagination
 - old media upload modal pagination
 - menus screen: list of "View all" posts, pages, etc. (displayed only when
 there are more than 50 items)

 Worth noting there are several other places in core where the addition of
 `aria-current` would benefit users, it would be great to open separate
 tickets to cover all of these cases.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/40833#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list