mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-04 12:44:31 +00:00
Accessibility: Change the posts "Quick Edit" link to a button.
For better accessibility and semantics, user interface controls that perform an action should be buttons. Links should exclusively be used for navigation. Also, adds an `aria-expanded` attribute to the button to communicate to assistive technologies the expanded / collapsed status of the Quick Edit form. Props Cheffheid, audrasjb, afercia. Fixes #38677. git-svn-id: https://develop.svn.wordpress.org/trunk@42725 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1267,7 +1267,7 @@ if ( $this->is_trash && current_user_can( get_post_type_object( $this->screen->p
|
||||
__( 'Edit' )
|
||||
);
|
||||
$actions['inline hide-if-no-js'] = sprintf(
|
||||
'<a href="#" class="editinline" aria-label="%s">%s</a>',
|
||||
'<button type="button" class="button-link editinline" aria-label="%s" aria-expanded="false">%s</button>',
|
||||
/* translators: %s: post title */
|
||||
esc_attr( sprintf( __( 'Quick edit “%s” inline' ), $title ) ),
|
||||
__( 'Quick Edit' )
|
||||
|
||||
Reference in New Issue
Block a user