Make WordPress Core

Changeset 40643


Ignore:
Timestamp:
05/11/2017 10:46:59 PM (7 years ago)
Author:
afercia
Message:

Accessibility: Add "(opens in a new window)" screen reader text to the "News-Nearby Events" dashboard widget footer links.

  • standardizes similar messages in core to always use (opens in a new window)
  • adds translators comments
  • hides the dashicons with aria-hidden="true", see #40428

Fixes #40733.

Location:
trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/dashboard.css

    r40607 r40643  
    441441}
    442442
     443/* Safari 10 + VoiceOver specific: without this, the hidden text gets read out before the link. */
     444.community-events-footer .screen-reader-text {
     445    height: inherit;
     446    white-space: nowrap;
     447}
     448
    443449/* Dashboard WordPress news */
    444450
  • trunk/src/wp-admin/includes/dashboard.php

    r40607 r40643  
    11261126
    11271127    <p class="community-events-footer">
    1128         <a href="https://make.wordpress.org/community/meetups-landing-page" target="_blank">
    1129             <?php _e( 'Meetups' ); ?> <span class="dashicons dashicons-external"></span>
    1130         </a>
     1128        <?php
     1129            printf(
     1130                '<a href="%1$s" target="_blank">%2$s <span class="screen-reader-text">%3$s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a>',
     1131                'https://make.wordpress.org/community/meetups-landing-page',
     1132                __( 'Meetups' ),
     1133                /* translators: accessibility text */
     1134                __( '(opens in a new window)' )
     1135            );
     1136        ?>
    11311137
    11321138        |
    11331139
    1134         <a href="https://central.wordcamp.org/schedule/" target="_blank">
    1135             <?php _e( 'WordCamps' ); ?> <span class="dashicons dashicons-external"></span>
    1136         </a>
     1140        <?php
     1141            printf(
     1142                '<a href="%1$s" target="_blank">%2$s <span class="screen-reader-text">%3$s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a>',
     1143                'https://central.wordcamp.org/schedule/',
     1144                __( 'WordCamps' ),
     1145                /* translators: accessibility text */
     1146                __( '(opens in a new window)' )
     1147            );
     1148        ?>
    11371149
    11381150        |
    11391151
    1140         <?php // translators: If a Rosetta site exists (e.g. https://es.wordpress.org/news/), then use that. Otherwise, leave untranslated. ?>
    1141         <a href="<?php _e( 'https://wordpress.org/news/' ); ?>" target="_blank">
    1142             <?php _e( 'News' ); ?> <span class="dashicons dashicons-external"></span>
    1143         </a>
     1152        <?php
     1153            printf(
     1154                '<a href="%1$s" target="_blank">%2$s <span class="screen-reader-text">%3$s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a>',
     1155                /* translators: If a Rosetta site exists (e.g. https://es.wordpress.org/news/), then use that. Otherwise, leave untranslated. */
     1156                esc_url( __( 'https://wordpress.org/news/' ) ),
     1157                __( 'News' ),
     1158                /* translators: accessibility text */
     1159                __( '(opens in a new window)' )
     1160            );
     1161        ?>
    11441162    </p>
    11451163
  • trunk/src/wp-admin/includes/meta-boxes.php

    r40422 r40643  
    5959    $preview_button_text,
    6060    /* translators: accessibility text */
    61     __( '(link opens in a new window)' )
     61    __( '(opens in a new window)' )
    6262);
    6363?>
  • trunk/src/wp-includes/class-wp-customize-manager.php

    r40379 r40643  
    41454145                esc_url( __( 'https://codex.wordpress.org/CSS' ) ),
    41464146                __( 'Learn more about CSS' ),
    4147                 __( '(link opens in a new window)' )
     4147                /* translators: accessibility text */
     4148                __( '(opens in a new window)' )
    41484149            ),
    41494150        ) );
Note: See TracChangeset for help on using the changeset viewer.