Make WordPress Core


Ignore:
Timestamp:
09/23/2019 12:18:53 PM (6 years ago)
Author:
afercia
Message:

Accessibility: Media: Make screen readers announce the Media search results.

  • adds audible messages via wp.a11y.speak() to announce the search results
  • removes a keyup event that was there only to support old browsers
  • removes aria-modal="true" from the media modal dialog as it prevents the ARIA live regions to be perceived by screen readers
  • triggers the search only after 2 ASCII characters have been typed

Props anevins, antpb, aduth, loreleiaurora, afercia.
Fixes #47146.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/media.php

    r46164 r46239  
    38553855        'searchMediaLabel'            => __( 'Search Media' ),
    38563856        'searchMediaPlaceholder'      => __( 'Search media items...' ), // placeholder (no ellipsis)
    3857         'noMedia'                     => __( 'No media files found.' ),
     3857        'mediaFound'                  => __( 'Number of media items found: %d' ),
     3858        'mediaFoundHasMoreResults'    => __( 'Number of media items displayed: %d. Scroll the page for more results.' ),
     3859        'noMedia'                     => __( 'No media items found.' ),
     3860        'noMediaTryNewSearch'         => __( 'No media items found. Try a different search.' ),
    38583861
    38593862        // Library Details
Note: See TracChangeset for help on using the changeset viewer.