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-section.php

    r54133 r55276  
    358358            <h3 class="accordion-section-title" tabindex="0">
    359359                {{ data.title }}
    360                 <span class="screen-reader-text"><?php _e( 'Press return or enter to open this section' ); ?></span>
     360                <span class="screen-reader-text">
     361                    <?php
     362                    /* translators: Hidden accessibility text. */
     363                    _e( 'Press return or enter to open this section' );
     364                    ?>
     365                </span>
    361366            </h3>
    362367            <ul class="accordion-section-content">
     
    364369                    <div class="customize-section-title">
    365370                        <button class="customize-section-back" tabindex="-1">
    366                             <span class="screen-reader-text"><?php _e( 'Back' ); ?></span>
     371                            <span class="screen-reader-text">
     372                                <?php
     373                                /* translators: Hidden accessibility text. */
     374                                _e( 'Back' );
     375                                ?>
     376                            </span>
    367377                        </button>
    368378                        <h3>
     
    373383                        </h3>
    374384                        <# if ( data.description && data.description_hidden ) { #>
    375                             <button type="button" class="customize-help-toggle dashicons dashicons-editor-help" aria-expanded="false"><span class="screen-reader-text"><?php _e( 'Help' ); ?></span></button>
     385                            <button type="button" class="customize-help-toggle dashicons dashicons-editor-help" aria-expanded="false"><span class="screen-reader-text">
     386                                <?php
     387                                /* translators: Hidden accessibility text. */
     388                                _e( 'Help' );
     389                                ?>
     390                            </span></button>
    376391                            <div class="description customize-section-description">
    377392                                {{{ data.description }}}
Note: See TracChangeset for help on using the changeset viewer.