Make WordPress Core


Ignore:
Timestamp:
02/07/2023 05:08:26 PM (10 months ago)
Author:
SergeyBiryukov
Message:

I18N: Mark screen reader strings as such with translator comments.

This aims to provide better context for translators and make it easier to determine that some strings contain hidden accessibility text and are not displayed in the UI.

Props kebbet, mercime, pavelevap, ocean90, swissspidy, Chouby, jipmoors, afercia, desrosj, costdev, audrasjb, SergeyBiryukov.
Fixes #29748.

File:
1 edited

Legend:

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

    r55161 r55276  
    892892            <div class="customize-section-title">
    893893                <button class="customize-section-back" tabindex="-1">
    894                     <span class="screen-reader-text"><?php _e( 'Back' ); ?></span>
     894                    <span class="screen-reader-text">
     895                        <?php
     896                        /* translators: Hidden accessibility text. */
     897                        _e( 'Back' );
     898                        ?>
     899                    </span>
    895900                </button>
    896901                <h3>
     
    905910            </div>
    906911            <div id="available-widgets-filter">
    907                 <label class="screen-reader-text" for="widgets-search"><?php _e( 'Search Widgets' ); ?></label>
     912                <label class="screen-reader-text" for="widgets-search">
     913                    <?php
     914                    /* translators: Hidden accessibility text. */
     915                    _e( 'Search Widgets' );
     916                    ?>
     917                </label>
    908918                <input type="text" id="widgets-search" placeholder="<?php esc_attr_e( 'Search widgets&hellip;' ); ?>" aria-describedby="widgets-search-desc" />
    909919                <div class="search-icon" aria-hidden="true"></div>
    910                 <button type="button" class="clear-results"><span class="screen-reader-text"><?php _e( 'Clear Results' ); ?></span></button>
    911                 <p class="screen-reader-text" id="widgets-search-desc"><?php _e( 'The search results will be updated as you type.' ); ?></p>
     920                <button type="button" class="clear-results"><span class="screen-reader-text">
     921                    <?php
     922                    /* translators: Hidden accessibility text. */
     923                    _e( 'Clear Results' );
     924                    ?>
     925                </span></button>
     926                <p class="screen-reader-text" id="widgets-search-desc">
     927                    <?php
     928                    /* translators: Hidden accessibility text. */
     929                    _e( 'The search results will be updated as you type.' );
     930                    ?>
     931                </p>
    912932            </div>
    913933            <div id="available-widgets-list">
Note: See TracChangeset for help on using the changeset viewer.