mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Accessibility: Improve accessibility for the Plugin details modal.
The plugin details modal can be invoked from several screens. There's now a new `.open-plugin-details-modal` CSS class to be used in combination with the `.thickbox` CSS class that adds everything needed for accessibility. - Adds an ARIA role `dialog` and an `aria-label` attribute to the modal - Adds a `title` attribute to the iframe inside the modal - Constrains tabbing within the modal - Restores focus back in a proper place when closing the modal Also, improves a bit the native Thickbox implementation: it should probably be replaced with some more modern tool but at least keyboard focus should be moved inside the modal. Fixes #33305. git-svn-id: https://develop.svn.wordpress.org/trunk@36964 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1245,7 +1245,7 @@ function wp_dashboard_plugins_output( $rss, $args = array() ) {
|
||||
|
||||
$ilink = wp_nonce_url('plugin-install.php?tab=plugin-information&plugin=' . $slug, 'install-plugin_' . $slug) . '&TB_iframe=true&width=600&height=800';
|
||||
echo '<li class="dashboard-news-plugin"><span>' . __( 'Popular Plugin' ) . ':</span> ' . esc_html( $raw_title ) .
|
||||
' <a href="' . $ilink . '" class="thickbox" aria-label="' .
|
||||
' <a href="' . $ilink . '" class="thickbox open-plugin-details-modal" aria-label="' .
|
||||
/* translators: %s: plugin name */
|
||||
esc_attr( sprintf( __( 'Install %s' ), $raw_title ) ) . '">(' . __( 'Install' ) . ')</a></li>';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user