Accessibility: List Tables: use aria-current for the views current link.

The `aria-current` attribute is a simple, effective way to help assistive
technologies users orientate themselves within a list of items. Continues the 
introduction in core of the `aria-current` attribute after [41359] and [41371].

Props joedolson, flixos90, afercia.
Fixes #32399.


git-svn-id: https://develop.svn.wordpress.org/trunk@41683 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrea Fercia
2017-10-02 19:43:02 +00:00
parent 54153520f2
commit 02588452f7
9 changed files with 56 additions and 31 deletions

View File

@@ -432,9 +432,9 @@ class WP_Plugins_List_Table extends WP_List_Table {
}
if ( 'search' !== $type ) {
$status_links[$type] = sprintf( "<a href='%s' %s>%s</a>",
$status_links[$type] = sprintf( "<a href='%s'%s>%s</a>",
add_query_arg('plugin_status', $type, 'plugins.php'),
( $type === $status ) ? ' class="current"' : '',
( $type === $status ) ? ' class="current" aria-current="page"' : '',
sprintf( $text, number_format_i18n( $count ) )
);
}