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-ms-users-list-table.php

    r55954 r55971  
    213213    protected function get_sortable_columns() {
    214214        return array(
    215             'username'   => 'login',
    216             'name'       => 'name',
    217             'email'      => 'email',
    218             'registered' => 'id',
     215            'username'   => array( 'login', false, __( 'Username' ), __( 'Table ordered by Username.' ), 'asc' ),
     216            'name'       => array( 'name', false, __( 'Name' ), __( 'Table ordered by Name.' ) ),
     217            'email'      => array( 'email', false, __( 'E-mail' ), __( 'Table ordered by E-mail.' ) ),
     218            'registered' => array( 'id', false, _x( 'Registered', 'user' ), __( 'Table ordered by User Registered Date.' ) ),
    219219        );
    220220    }
Note: See TracChangeset for help on using the changeset viewer.