WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/09/2019 08:57:06 PM (18 months ago)
Author:
afercia
Message:

Accessibility: Add aria-current to the links in the <nav> elements introduced in [44905].

Also fixes a few translators comments and coding standards.

Props audrasjb.
Fixes #47106.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/freedoms.php

    r45292 r45300  
    1919
    2020if ( $is_privacy_notice ) {
    21     $freedoms_class = '';
    22     $privacy_class  = ' nav-tab-active';
     21    $freedoms_class        = '';
     22    $privacy_class         = ' nav-tab-active';
     23    $freedoms_aria_current = '';
     24    $privacy_aria_current  = ' aria-current="page"';
    2325} else {
    24     $freedoms_class = ' nav-tab-active';
    25     $privacy_class  = '';
     26    $freedoms_class        = ' nav-tab-active';
     27    $privacy_class         = '';
     28    $freedoms_aria_current = ' aria-current="page"';
     29    $privacy_aria_current  = '';
    2630}
    2731
     
    2933<div class="wrap about-wrap full-width-layout">
    3034
    31 <h1><?php printf( __( 'Welcome to WordPress %s' ), $display_version ); ?></h1>
     35<h1>
     36    <?php
     37    /* translators: %s: The current WordPress version number */
     38    printf( __( 'Welcome to WordPress&nbsp;%s' ), $display_version );
     39    ?>
     40</h1>
    3241
    3342<p class="about-text"><?php printf( __( 'Congratulations on updating to WordPress 5.2! This update makes it easier than ever to fix your site if something goes wrong.' ), $display_version ); ?></p>
    3443
    35 <div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div>
     44<div class="wp-badge">
     45    <?php
     46    /* translators: %s: The current WordPress version number */
     47    printf( __( 'Version %s' ), $display_version );
     48    ?>
     49</div>
    3650
    3751<nav class="nav-tab-wrapper wp-clearfix" aria-label="<?php esc_attr_e( 'Secondary menu' ); ?>">
    3852    <a href="about.php" class="nav-tab"><?php _e( 'What&#8217;s New' ); ?></a>
    3953    <a href="credits.php" class="nav-tab"><?php _e( 'Credits' ); ?></a>
    40     <a href="freedoms.php" class="nav-tab<?php echo $freedoms_class; ?>"><?php _e( 'Freedoms' ); ?></a>
    41     <a href="freedoms.php?privacy-notice" class="nav-tab<?php echo $privacy_class; ?>"><?php _e( 'Privacy' ); ?></a>
     54    <a href="freedoms.php" class="nav-tab<?php echo $freedoms_class; ?>"<?php echo $freedoms_aria_current; ?>><?php _e( 'Freedoms' ); ?></a>
     55    <a href="freedoms.php?privacy-notice" class="nav-tab<?php echo $privacy_class; ?>"<?php echo $privacy_aria_current; ?>><?php _e( 'Privacy' ); ?></a>
    4256</nav>
    4357
     
    4761    <p class="about-description"><?php _e( 'From time to time, your WordPress site may send data to WordPress.org &#8212; including, but not limited to &#8212; the version of WordPress you are using, and a list of installed plugins and themes.' ); ?></p>
    4862
    49     <p><?php printf( __( 'This data is used to provide general enhancements to WordPress, which includes helping to protect your site by finding and automatically installing new updates. It is also used to calculate statistics, such as those shown on the <a href="%s">WordPress.org stats page</a>.' ), 'https://wordpress.org/about/stats/' ); ?></p>
     63    <p>
     64        <?php
     65        /* translators: %s: https://wordpress.org/about/stats/ */
     66        printf( __( 'This data is used to provide general enhancements to WordPress, which includes helping to protect your site by finding and automatically installing new updates. It is also used to calculate statistics, such as those shown on the <a href="%s">WordPress.org stats page</a>.' ), 'https://wordpress.org/about/stats/' );
     67        ?>
     68    </p>
    5069
    51     <p><?php printf( __( 'We take privacy and transparency very seriously. To learn more about what data we collect, and how we use it, please visit <a href="%s">WordPress.org/about/privacy</a>.' ), 'https://wordpress.org/about/privacy/' ); ?></p>
     70    <p>
     71        <?php
     72        /* translators: %s: https://wordpress.org/about/privacy/ */
     73        printf( __( 'We take privacy and transparency very seriously. To learn more about what data we collect, and how we use it, please visit <a href="%s">WordPress.org/about/privacy</a>.' ), 'https://wordpress.org/about/privacy/' );
     74        ?>
     75    </p>
    5276</div>
    5377
     
    5680    <div class="feature-section has-1-columns">
    5781        <h2><?php _e( 'Freedoms' ); ?></h2>
    58         <p class="about-description"><?php printf( __( 'WordPress is Free and open source software, built by a distributed community of mostly volunteer developers from around the world. WordPress comes with some awesome, worldview-changing rights courtesy of its <a href="%s">license</a>, the GPL.' ), 'https://wordpress.org/about/license/' ); ?></p>
     82        <p class="about-description">
     83        <?php
     84            /* translators: %s: https://wordpress.org/about/license/ */
     85            printf( __( 'WordPress is Free and open source software, built by a distributed community of mostly volunteer developers from around the world. WordPress comes with some awesome, worldview-changing rights courtesy of its <a href="%s">license</a>, the GPL.' ), 'https://wordpress.org/about/license/' );
     86        ?>
     87        </p>
    5988    </div>
    6089
     
    83112
    84113    <div class="feature-section has-1-columns">
    85         <p><?php printf( __( 'WordPress grows when people like you tell their friends about it, and the thousands of businesses and services that are built on and around WordPress share that fact with their users. We&#8217;re flattered every time someone spreads the good word, just make sure to <a href="%s">check out our trademark guidelines</a> first.' ), 'https://wordpressfoundation.org/trademark-policy/' ); ?></p>
     114        <p>
     115        <?php
     116            /* translators: %s: https://wordpressfoundation.org/trademark-policy/ */
     117            printf( __( 'WordPress grows when people like you tell their friends about it, and the thousands of businesses and services that are built on and around WordPress share that fact with their users. We&#8217;re flattered every time someone spreads the good word, just make sure to <a href="%s">check out our trademark guidelines</a> first.' ), 'https://wordpressfoundation.org/trademark-policy/' );
     118        ?>
     119        </p>
    86120
    87121        <p>
     
    89123            $plugins_url = current_user_can( 'activate_plugins' ) ? admin_url( 'plugins.php' ) : __( 'https://wordpress.org/plugins/' );
    90124            $themes_url  = current_user_can( 'switch_themes' ) ? admin_url( 'themes.php' ) : __( 'https://wordpress.org/themes/' );
    91 
     125            /* translators: %s: https://wordpress.org/about/license/ */
    92126            printf( __( 'Every plugin and theme in WordPress.org&#8217;s directory is 100%% GPL or a similarly free and compatible license, so you can feel safe finding <a href="%1$s">plugins</a> and <a href="%2$s">themes</a> there. If you get a plugin or theme from another source, make sure to <a href="%3$s">ask them if it&#8217;s GPL</a> first. If they don&#8217;t respect the WordPress license, we don&#8217;t recommend them.' ), $plugins_url, $themes_url, 'https://wordpress.org/about/license/' );
    93127        ?>
Note: See TracChangeset for help on using the changeset viewer.