Make WordPress Core


Ignore:
Timestamp:
02/07/2023 05:08:26 PM (17 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/general-template.php

    r55210 r55276  
    323323            $form = '<form role="search" ' . $aria_label . 'method="get" class="search-form" action="' . esc_url( home_url( '/' ) ) . '">
    324324                <label>
    325                     <span class="screen-reader-text">' . _x( 'Search for:', 'label' ) . '</span>
     325                    <span class="screen-reader-text">' .
     326                    /* translators: Hidden accessibility text. */
     327                    _x( 'Search for:', 'label' ) .
     328                    '</span>
    326329                    <input type="search" class="search-field" placeholder="' . esc_attr_x( 'Search &hellip;', 'placeholder' ) . '" value="' . get_search_query() . '" name="s" />
    327330                </label>
     
    331334            $form = '<form role="search" ' . $aria_label . 'method="get" id="searchform" class="searchform" action="' . esc_url( home_url( '/' ) ) . '">
    332335                <div>
    333                     <label class="screen-reader-text" for="s">' . _x( 'Search for:', 'label' ) . '</label>
     336                    <label class="screen-reader-text" for="s">' .
     337                    /* translators: Hidden accessibility text. */
     338                    _x( 'Search for:', 'label' ) .
     339                    '</label>
    334340                    <input type="text" value="' . get_search_query() . '" name="s" id="s" />
    335341                    <input type="submit" id="searchsubmit" value="' . esc_attr_x( 'Search', 'submit button' ) . '" />
Note: See TracChangeset for help on using the changeset viewer.