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

    r55161 r55276  
    42864286                <div class="notification-message">{{{ data.message || data.code }}}</div>
    42874287                <# if ( data.dismissible ) { #>
    4288                     <button type="button" class="notice-dismiss"><span class="screen-reader-text"><?php _e( 'Dismiss' ); ?></span></button>
     4288                    <button type="button" class="notice-dismiss"><span class="screen-reader-text">
     4289                        <?php
     4290                        /* translators: Hidden accessibility text. */
     4291                        _e( 'Dismiss' );
     4292                        ?>
     4293                    </span></button>
    42894294                <# } #>
    42904295            </li>
     
    43534358            <div class="customize-control-notifications-container"></div>
    43544359            <div class="preview-link-wrapper">
    4355                 <label for="{{ elementPrefix }}customize-preview-link-input" class="screen-reader-text"><?php esc_html_e( 'Preview Link' ); ?></label>
     4360                <label for="{{ elementPrefix }}customize-preview-link-input" class="screen-reader-text">
     4361                    <?php
     4362                    /* translators: Hidden accessibility text. */
     4363                    esc_html_e( 'Preview Link' );
     4364                    ?>
     4365                </label>
    43564366                <a href="" target="">
    43574367                    <span class="preview-control-element" data-component="url"></span>
    4358                     <span class="screen-reader-text"><?php _e( '(opens in a new tab)' ); ?></span>
     4368                    <span class="screen-reader-text">
     4369                        <?php
     4370                        /* translators: Hidden accessibility text. */
     4371                        _e( '(opens in a new tab)' );
     4372                        ?>
     4373                    </span>
    43594374                </a>
    43604375                <input id="{{ elementPrefix }}customize-preview-link-input" readonly tabindex="-1" class="preview-control-element" data-component="input">
     
    56775692            esc_url( __( 'https://wordpress.org/support/article/css/' ) ),
    56785693            __( 'Learn more about CSS' ),
    5679             /* translators: Accessibility text. */
     5694            /* translators: Hidden accessibility text. */
    56805695            __( '(opens in a new tab)' )
    56815696        );
     
    56985713                sprintf(
    56995714                    '<span class="screen-reader-text"> %s</span>',
    5700                     /* translators: Accessibility text. */
     5715                    /* translators: Hidden accessibility text. */
    57015716                    __( '(opens in a new tab)' )
    57025717                )
Note: See TracChangeset for help on using the changeset viewer.