Make WordPress Core


Ignore:
Timestamp:
05/14/2024 04:47:03 PM (2 months ago)
Author:
joedolson
Message:

Administration: A11y: Replace placeholders with visible labels.

Add visible labels to inputs that are using placeholder attributes as a substitute for visible labeling.

Labels added or made visible on the customizer theme search, customizer widget search, customizer menu item search, customizer new page UI, the search plugins screens, the media search screens, and the classic editor link inserter.

Props afercia, joedolson, rcreators, sabernhardt.
See #40331.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-customize-widgets.php

    r57309 r58146  
    910910            </div>
    911911            <div id="available-widgets-filter">
    912                 <label class="screen-reader-text" for="widgets-search">
     912                <label for="widgets-search">
    913913                    <?php
    914914                    /* translators: Hidden accessibility text. */
     
    916916                    ?>
    917917                </label>
    918                 <input type="text" id="widgets-search" placeholder="<?php esc_attr_e( 'Search widgets&hellip;' ); ?>" aria-describedby="widgets-search-desc" />
     918                <input type="text" id="widgets-search" aria-describedby="widgets-search-desc" />
    919919                <div class="search-icon" aria-hidden="true"></div>
    920920                <button type="button" class="clear-results"><span class="screen-reader-text">
Note: See TracChangeset for help on using the changeset viewer.