Upgrade/Install: Use ARIA button class on plugin and theme auto-updates action links

According to the [accesability guidelines](https://developer.wordpress.org/coding-standards/wordpress-coding-standards/accessibility/#semantics-for-controls), the control should be a link when JavaScript is not available and a button the rest of the time.

In addition, handlers were added for spacebar usage, and some changes to the a11y speak verbiage.

Fixes #50516.
Props ryokuhi, audrasjb, afercia, whyisjake/




git-svn-id: https://develop.svn.wordpress.org/trunk@48418 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jake Spurlock
2020-07-10 06:16:06 +00:00
parent bf93e9699f
commit 1b251feeec
6 changed files with 70 additions and 38 deletions

View File

@@ -1076,7 +1076,7 @@ class WP_Plugins_List_Table extends WP_List_Table {
$url = add_query_arg( $query_args, 'plugins.php' );
$html[] = sprintf(
'<a href="%s" class="toggle-auto-update" data-wp-action="%s">',
'<a href="%s" class="toggle-auto-update aria-button-if-js" data-wp-action="%s">',
wp_nonce_url( $url, 'updates' ),
$action
);