Make WordPress Core


Ignore:
Timestamp:
06/21/2023 09:45:52 PM (11 months ago)
Author:
joedolson
Message:

Administration: Set accessible state for list table headers.

Implement aria-sort and change icon states to indicate current sort for list tables. Allow screen reader users to get context about the current sort and allow sighted users to know how the table is currently sorted.

Props afercia, rianrietveld, joedolson, alexstine, johnjamesjacoby.
Fixes #32170.

File:
1 edited

Legend:

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

    r55954 r55971  
    144144    protected function get_sortable_columns() {
    145145        return array(
    146             'name'    => 'name',
    147             'url'     => 'url',
    148             'visible' => 'visible',
    149             'rating'  => 'rating',
     146            'name'    => array( 'name', false, _x( 'Name', 'link name' ), __( 'Table ordered by Name.' ), 'asc' ),
     147            'url'     => array( 'url', false, __( 'URL' ), __( 'Table ordered by URL.' ) ),
     148            'visible' => array( 'visible', false, __( 'Visible' ), __( 'Table ordered by Visibility.' ) ),
     149            'rating'  => array( 'rating', false, __( 'Rating' ), __( 'Table ordered by Rating.' ) ),
    150150        );
    151151    }
Note: See TracChangeset for help on using the changeset viewer.