WordPress.org

Make WordPress Core


Ignore:
Timestamp:
02/21/2018 10:30:34 PM (4 years ago)
Author:
afercia
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-posts-list-table.php

    r42638 r42725  
    12681268            );
    12691269            $actions['inline hide-if-no-js'] = sprintf(
    1270                 '<a href="#" class="editinline" aria-label="%s">%s</a>',
     1270                '<button type="button" class="button-link editinline" aria-label="%s" aria-expanded="false">%s</button>',
    12711271                /* translators: %s: post title */
    12721272                esc_attr( sprintf( __( 'Quick edit &#8220;%s&#8221; inline' ), $title ) ),
Note: See TracChangeset for help on using the changeset viewer.