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

    r55954 r55971  
    390390     */
    391391    protected function get_sortable_columns() {
     392
     393        if ( is_subdomain_install() ) {
     394            $abbr = __( 'Domain' );
     395            $blogname_orderby_text = __( 'Table ordered by Site Domain Name.' );
     396        } else {
     397            $abbr = __( 'Path' );
     398            $blogname_orderby_text = __( 'Table ordered by Site Path.' );
     399        }
     400
    392401        return array(
    393             'blogname'    => 'blogname',
    394             'lastupdated' => 'lastupdated',
    395             'registered'  => 'blog_id',
     402            'blogname'    => array( 'blogname', false, $abbr, $blogname_orderby_text ),
     403            'lastupdated' => array( 'lastupdated', true, __( 'Last Updated' ), __( 'Table ordered by Last Updated.' ) ),
     404            'registered'  => array( 'blog_id', true, _x( 'Registered', 'site' ), __( 'Table ordered by Site Registered Date.' ), 'desc' ),
    396405        );
    397406    }
Note: See TracChangeset for help on using the changeset viewer.