Make WordPress Core


Ignore:
Timestamp:
02/07/2023 05:08:26 PM (2 years 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-panel.php

    r54133 r55276  
    349349            <h3 class="accordion-section-title" tabindex="0">
    350350                {{ data.title }}
    351                 <span class="screen-reader-text"><?php _e( 'Press return or enter to open this panel' ); ?></span>
     351                <span class="screen-reader-text">
     352                    <?php
     353                    /* translators: Hidden accessibility text. */
     354                    _e( 'Press return or enter to open this panel' );
     355                    ?>
     356                </span>
    352357            </h3>
    353358            <ul class="accordion-sub-container control-panel-content"></ul>
     
    369374        ?>
    370375        <li class="panel-meta customize-info accordion-section <# if ( ! data.description ) { #> cannot-expand<# } #>">
    371             <button class="customize-panel-back" tabindex="-1"><span class="screen-reader-text"><?php _e( 'Back' ); ?></span></button>
     376            <button class="customize-panel-back" tabindex="-1"><span class="screen-reader-text">
     377                <?php
     378                /* translators: Hidden accessibility text. */
     379                _e( 'Back' );
     380                ?>
     381            </span></button>
    372382            <div class="accordion-section-title">
    373383                <span class="preview-notice">
     
    378388                </span>
    379389                <# if ( data.description ) { #>
    380                     <button type="button" class="customize-help-toggle dashicons dashicons-editor-help" aria-expanded="false"><span class="screen-reader-text"><?php _e( 'Help' ); ?></span></button>
     390                    <button type="button" class="customize-help-toggle dashicons dashicons-editor-help" aria-expanded="false"><span class="screen-reader-text">
     391                        <?php
     392                        /* translators: Hidden accessibility text. */
     393                        _e( 'Help' );
     394                        ?>
     395                    </span></button>
    381396                <# } #>
    382397            </div>
Note: See TracChangeset for help on using the changeset viewer.