Make WordPress Core


Ignore:
Timestamp:
09/28/2025 11:38:57 PM (8 months ago)
Author:
joedolson
Message:

A11y: Ensure icons are not spoken by screen readers.

For all CSS generated icons across core, either add aria-hidden="true" to the HTML wrapper or set the generated content alternative to an empty string in the CSS using the alternative text specification for CSS generated content.

Props afercia, joedolson, cheffheid, jhabdas.
Fixes #40428.

File:
1 edited

Legend:

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

    r60786 r60806  
    651651    wp_enqueue_media( array( 'post' => $post ) );
    652652
    653     $img = '<span class="wp-media-buttons-icon"></span> ';
     653    $img = '<span class="wp-media-buttons-icon" aria-hidden="true"></span> ';
    654654
    655655    $id_attribute = 1 === $instance ? ' id="insert-media-button"' : '';
Note: See TracChangeset for help on using the changeset viewer.