Make WordPress Core


Ignore:
Timestamp:
11/25/2019 10:21:25 AM (6 years ago)
Author:
SergeyBiryukov
Message:

Accessibility: Add an aria-current attribute to the Media Library switch links.

The aria-current attribute is a simple, effective, way to help assistive technology users orientate themselves within a set of items.

Props mayanksonawat, afercia.
Merges [46746] to the 5.3 branch.
Fixes #48271.

Location:
branches/5.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.3

  • branches/5.3/src/wp-includes/media-template.php

    r46489 r46777  
    319319            <span class="screen-reader-text"><?php _e( 'List View' ); ?></span>
    320320        </a>
    321         <a href="<?php echo esc_url( add_query_arg( 'mode', 'grid', $_SERVER['REQUEST_URI'] ) ); ?>" class="view-grid current">
     321        <a href="<?php echo esc_url( add_query_arg( 'mode', 'grid', $_SERVER['REQUEST_URI'] ) ); ?>" class="view-grid current" aria-current="page">
    322322            <span class="screen-reader-text"><?php _e( 'Grid View' ); ?></span>
    323323        </a>
Note: See TracChangeset for help on using the changeset viewer.