WordPress.org

Make WordPress Core

Changeset 45930


Ignore:
Timestamp:
09/02/2019 09:43:39 PM (3 months ago)
Author:
afercia
Message:

Accessibility: Audit usage of abbreviations.

Title attributes on abbreviations are only available to a minority of users. The
best option is to avoid unnecessary abbreviations when possible. In the other cases,
use an <abbr> element (which provides a hint to user agents on how to announce
and display the abbreviation) and provide an expansion in plain text on first use.

  • readme.html: improves abbreviations and removes unnecessary title attributes
  • options-general: removes unnecessary abbreviations and improves the remaining ones
  • customizer schedule changeset date: removes unnecessary abbreviations and improves the remaining ones
  • posts table date: uses a span element instead of an abbr element because this is not an abbreviation

Fixes #46980.

Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/readme.html

    r45674 r45930  
    2727        </ol>
    2828    </li>
    29     <li>Once the configuration file is set up, the installer will set up the tables needed for your site. If there is an error, double check your <code>wp-config.php</code> file, and try again. If it fails again, please go to the <a href="https://wordpress.org/support/forums/" title="WordPress support">support forums</a> with as much data as you can gather.</li>
     29    <li>Once the configuration file is set up, the installer will set up the tables needed for your site. If there is an error, double check your <code>wp-config.php</code> file, and try again. If it fails again, please go to the <a href="https://wordpress.org/support/forums/">WordPress support forums</a> with as much data as you can gather.</li>
    3030    <li><strong>If you did not enter a password, note the password given to you.</strong> If you did not provide a username, it will be <code>admin</code>.</li>
    3131    <li>The installer should then send you to the <a href="wp-login.php">login page</a>. Sign in with the username and password you chose during the installation. If a password was generated for you, you can then click on &#8220;Profile&#8221; to change the password.</li>
     
    4949
    5050<h2>Migrating from other systems</h2>
    51 <p>WordPress can <a href="https://wordpress.org/support/article/importing-content/">import from a number of systems</a>. First you need to get WordPress installed and working as described above, before using <a href="wp-admin/import.php" title="Import to WordPress">our import tools</a>.</p>
     51<p>WordPress can <a href="https://wordpress.org/support/article/importing-content/">import from a number of systems</a>. First you need to get WordPress installed and working as described above, before using <a href="wp-admin/import.php">our import tools</a>.</p>
    5252
    5353<h2>System Requirements</h2>
     
    7777    <dt><a href="https://wordpress.org/support/forums/">WordPress Support Forums</a></dt>
    7878        <dd>If you&#8217;ve looked everywhere and still can&#8217;t find an answer, the support forums are very active and have a large community ready to help. To help them help you be sure to use a descriptive thread title and describe your question in as much detail as possible.</dd>
    79     <dt><a href="https://codex.wordpress.org/IRC">WordPress <abbr title="Internet Relay Chat">IRC</abbr> Channel</a></dt>
     79    <dt><a href="https://codex.wordpress.org/IRC">WordPress <abbr>IRC</abbr> (Internet Relay Chat) Channel</a></dt>
    8080        <dd>There is an online chat channel that is used for discussion among people who use WordPress and occasionally support topics. The above wiki page should point you in the right direction. (<a href="irc://irc.freenode.net/wordpress">irc.freenode.net #wordpress</a>)</dd>
    8181</dl>
     
    8484<ul>
    8585    <li>If you have any suggestions, ideas, or comments, or if you (gasp!) found a bug, join us in the <a href="https://wordpress.org/support/forums/">Support Forums</a>.</li>
    86     <li>WordPress has a robust plugin <abbr title="application programming interface">API</abbr> that makes extending the code easy. If you are a developer interested in utilizing this, see the <a href="https://developer.wordpress.org/plugins/">Plugin Developer Handbook</a>. You shouldn&#8217;t modify any of the core code.</li>
     86    <li>WordPress has a robust plugin <abbr>API</abbr> (Application Programming Interface) that makes extending the code easy. If you are a developer interested in utilizing this, see the <a href="https://developer.wordpress.org/plugins/">Plugin Developer Handbook</a>. You shouldn&#8217;t modify any of the core code.</li>
    8787</ul>
    8888
     
    9090<p>WordPress has no multi-million dollar marketing campaign or celebrity sponsors, but we do have something even better&#8212;you. If you enjoy WordPress please consider telling a friend, setting it up for someone less knowledgable than yourself, or writing the author of a media article that overlooks us.</p>
    9191
    92 <p>WordPress is the official continuation of <a href="http://cafelog.com/">b2/caf&#233;log</a>, which came from Michel V. The work has been continued by the <a href="https://wordpress.org/about/">WordPress developers</a>. If you would like to support WordPress, please consider <a href="https://wordpress.org/donate/" title="Donate to WordPress">donating</a>.</p>
     92<p>WordPress is the official continuation of <a href="http://cafelog.com/">b2/caf&#233;log</a>, which came from Michel V. The work has been continued by the <a href="https://wordpress.org/about/">WordPress developers</a>. If you would like to support WordPress, please consider <a href="https://wordpress.org/donate/">donating</a>.</p>
    9393
    9494<h2>License</h2>
    95 <p>WordPress is free software, and is released under the terms of the <abbr title="GNU General Public License">GPL</abbr> version 2 or (at your option) any later version. See <a href="license.txt">license.txt</a>.</p>
     95<p>WordPress is free software, and is released under the terms of the <abbr>GPL</abbr> (GNU General Public License) version 2 or (at your option) any later version. See <a href="license.txt">license.txt</a>.</p>
    9696
    9797</body>
  • trunk/src/wp-admin/css/common.css

    r45909 r45930  
    30913091    background: #f9f9f9;
    30923092    -moz-tab-size: 4;
    3093     -o-tab-size: 4;
    30943093    tab-size: 4;
    30953094}
  • trunk/src/wp-admin/css/customize-controls.css

    r45189 r45930  
    358358.date-time-fields .time-row {
    359359    margin-top: 12px;
    360 }
    361 
    362 .date-time-fields .date-timezone {
    363     line-height: 2.2;
    364     text-decoration: none;
    365360}
    366361
     
    15901585    padding: 6px 8px;
    15911586    -moz-tab-size: 2;
    1592     -o-tab-size: 2;
    15931587    tab-size: 2;
    15941588}
     
    27852779    }
    27862780
    2787     .date-time-fields .date-timezone {
    2788         line-height: 3.2;
    2789     }
    2790 
    27912781    #customize-control-changeset_preview_link a {
    27922782        bottom: 16px;
  • trunk/src/wp-admin/css/list-tables.css

    r45824 r45930  
    309309.fixed .column-format {
    310310    width: 10%;
     311}
     312
     313.column-date span[title] {
     314    -webkit-text-decoration: dotted underline;
     315    text-decoration: dotted underline;
    311316}
    312317
  • trunk/src/wp-admin/includes/class-wp-posts-list-table.php

    r45926 r45930  
    11281128
    11291129            /** This filter is documented in wp-admin/includes/class-wp-posts-list-table.php */
    1130             echo '<abbr title="' . $t_time . '">' . apply_filters( 'post_date_column_time', $h_time, $post, 'date', $mode ) . '</abbr>';
     1130            echo '<span title="' . $t_time . '">' . apply_filters( 'post_date_column_time', $h_time, $post, 'date', $mode ) . '</span>';
    11311131        }
    11321132    }
  • trunk/src/wp-admin/options-general.php

    r45926 r45930  
    229229</select>
    230230
    231 <p class="description" id="timezone-description"><?php _e( 'Choose either a city in the same timezone as you or a UTC timezone offset.' ); ?></p>
     231<p class="description" id="timezone-description">
     232<?php
     233    printf(
     234        /* translators: %s: UTC abbreviation */
     235        __( 'Choose either a city in the same timezone as you or a %s (Coordinated Universal Time) time offset.' ),
     236        '<abbr>UTC</abbr>'
     237    );
     238    ?>
     239</p>
    232240
    233241<p class="timezone-info">
     
    235243    <?php
    236244        printf(
    237             /* translators: 1: UTC abbreviation, 2: UTC time */
    238             __( 'Universal time (%1$s) is %2$s.' ),
    239             '<abbr>' . __( 'UTC' ) . '</abbr>',
     245            /* translators: 1: UTC time */
     246            __( 'Universal time is %1$s.' ),
    240247            '<code>' . date_i18n( $timezone_format, false, true ) . '</code>'
    241248        );
  • trunk/src/wp-includes/css/admin-bar.css

    r45826 r45930  
    10661066    #wpadminbar .ab-top-menu > .menupop > .ab-sub-wrapper {
    10671067        min-width: -webkit-fit-content;
    1068         min-width: -moz-fit-content;
    10691068        min-width: fit-content;
    10701069    }
  • trunk/src/wp-includes/customize/class-wp-customize-date-time-control.php

    r45737 r45930  
    174174                            </select>
    175175                        <# } #>
    176                         <abbr class="date-timezone" aria-label="<?php esc_attr_e( 'Timezone' ); ?>" title="<?php echo esc_attr( $timezone_info['description'] ); ?>"><?php echo esc_html( $timezone_info['abbr'] ); ?></abbr>
     176                        <p><?php echo $timezone_info['description']; ?></p>
    177177                    </div>
    178178                </fieldset>
     
    229229            if ( $tz ) {
    230230                $now                   = new DateTime( 'now', $tz );
    231                 $formatted_gmt_offset  = sprintf( 'UTC%s', $this->format_gmt_offset( $tz->getOffset( $now ) / 3600 ) );
     231                $formatted_gmt_offset  = $this->format_gmt_offset( $tz->getOffset( $now ) / 3600 );
    232232                $tz_name               = str_replace( '_', ' ', $tz->getName() );
    233233                $timezone_info['abbr'] = $now->format( 'T' );
    234234
    235                 /* translators: 1: timezone name, 2: timezone abbreviation, 3: gmt offset  */
    236                 $timezone_info['description'] = sprintf( __( 'Timezone is %1$s (%2$s), currently %3$s.' ), $tz_name, $timezone_info['abbr'], $formatted_gmt_offset );
     235                $timezone_info['description'] = sprintf(
     236                    /* translators: 1: timezone name, 2: timezone abbreviation, 3: UTC abbreviation and offset, 4: UTC offset  */
     237                    __( 'Your timezone is set to %1$s (%2$s), currently %3$s (Coordinated Universal Time %4$s).' ),
     238                    $tz_name,
     239                    '<abbr>' . $timezone_info['abbr'] . '</abbr>',
     240                    '<abbr>UTC</abbr>' . $formatted_gmt_offset,
     241                    $formatted_gmt_offset
     242                );
    237243            } else {
    238244                $timezone_info['description'] = '';
    239245            }
    240246        } else {
    241             $formatted_gmt_offset  = $this->format_gmt_offset( intval( get_option( 'gmt_offset', 0 ) ) );
    242             $timezone_info['abbr'] = sprintf( 'UTC%s', $formatted_gmt_offset );
    243 
    244             /* translators: %s: UTC offset  */
    245             $timezone_info['description'] = sprintf( __( 'Timezone is %s.' ), $timezone_info['abbr'] );
     247            $formatted_gmt_offset = $this->format_gmt_offset( intval( get_option( 'gmt_offset', 0 ) ) );
     248
     249            $timezone_info['description'] = sprintf(
     250                /* translators: 1: UTC abbreviation and offset, 2: UTC offset */
     251                __( 'Your timezone is set to %1$s (Coordinated Universal Time %2$s).' ),
     252                '<abbr>UTC</abbr>' . $formatted_gmt_offset,
     253                $formatted_gmt_offset
     254            );
    246255        }
    247256
  • trunk/tests/qunit/index.html

    r45147 r45930  
    950950                            </select>
    951951                        <# } #>
    952                         <abbr class="date-timezone" aria-label="Timezone" title="Timezone is America/Los Angeles (PDT), currently UTC-7.">PDT</abbr>
     952                        <p>Your timezone is set to America/Los Angeles (<abbr>PDT</abbr>), currently <abbr>UTC</abbr>-7 (Coordinated Universal Time -7).</p>
    953953                    </div>
    954954                </fieldset>
Note: See TracChangeset for help on using the changeset viewer.