[wp-trac] [WordPress Trac] #40833: Allow addition of aria-current="page" to current page element in paginate_links()
WordPress Trac
noreply at wordpress.org
Mon May 22 08:50:14 UTC 2017
#40833: Allow addition of aria-current="page" to current page element in
paginate_links()
----------------------------+-----------------------------
Reporter: GrahamArmfield | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: trunk
Severity: normal | Keywords:
Focuses: accessibility |
----------------------------+-----------------------------
Ticket #40359 aims to allow attributes to be added to links in navigation
menus - including `aria-current="page"`.
This ticket concerns the output created by `paginate_links()`. It would be
useful to add the `aria-current="page"` attribute to the element
representing the current page in the pagination list.
The `aria-current` attribute is a new ARIA attribute being introduced in
ARIA 1.1 and its aim is to help assistive technology users (often screen
readers) orientate themselves within a list of items. There are many
possible values for this attribute, but the most appropriate here would be
'page'.
Further information on aria-current can be found at: https://www.w3.org/TR
/wai-aria-1.1/#aria-current
== Examples ==
Example output from current paginate_links:
{{{
<ul class='page-numbers'>
<li><span class='page-numbers current'>1</span></li>
<li><a class='page-numbers'
href='http://blah.com/blog/page/2/'>2</a></li>
<li><a class='page-numbers'
href='http://blah.com/blog/page/3/'>3</a></li>
<li><a class="next page-numbers"
href="http://blah.com/blog/page/2/">Older »</a></li>
</ul>
}}}
Example enhanced with `aria-current` attribute:
{{{
<ul class='page-numbers'>
<li><span class='page-numbers current' aria-
current="page">1</span></li>
<li><a class='page-numbers'
href='http://blah.com/blog/page/2/'>2</a></li>
<li><a class='page-numbers'
href='http://blah.com/blog/page/3/'>3</a></li>
<li><a class="next page-numbers"
href="http://blah.com/blog/page/2/">Older »</a></li>
</ul>
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40833>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list