Make WordPress Core


Ignore:
Timestamp:
02/07/2023 05:08:26 PM (18 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-content/themes/twentysixteen/searchform.php

    r40851 r55276  
    1111<form role="search" method="get" class="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">
    1212    <label>
    13         <span class="screen-reader-text"><?php echo _x( 'Search for:', 'label', 'twentysixteen' ); ?></span>
     13        <span class="screen-reader-text">
     14            <?php
     15            /* translators: Hidden accessibility text. */
     16            echo _x( 'Search for:', 'label', 'twentysixteen' );
     17            ?>
     18        </span>
    1419        <input type="search" class="search-field" placeholder="<?php echo esc_attr_x( 'Search &hellip;', 'placeholder', 'twentysixteen' ); ?>" value="<?php echo get_search_query(); ?>" name="s" />
    1520    </label>
    16     <button type="submit" class="search-submit"><span class="screen-reader-text"><?php echo _x( 'Search', 'submit button', 'twentysixteen' ); ?></span></button>
     21    <button type="submit" class="search-submit"><span class="screen-reader-text">
     22        <?php
     23        /* translators: Hidden accessibility text. */
     24        echo _x( 'Search', 'submit button', 'twentysixteen' );
     25        ?>
     26    </span></button>
    1727</form>
Note: See TracChangeset for help on using the changeset viewer.