WordPress.org

Make WordPress Core

Changeset 43125 for trunk


Ignore:
Timestamp:
05/02/2018 09:59:59 PM (2 years ago)
Author:
iandunn
Message:

Comments: Move comment consent input outside the label for a11y.

Non-wrapping labels are more widely supported by assitive technologies. The CSS changes account for the element re-ordering, and tweak the formatting for improved readability.

Props afercia, xkon, laurelfulford, azaozz.
Fixes #43436.

Location:
trunk/src
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyeleven/rtl.css

    r40839 r43125  
    103103    background-position: 97% 6px;
    104104    padding: 4px 28px 4px 10px;
     105}
     106#respond #wp-comment-cookies-consent {
     107    margin: 0 0 0 10px;
    105108}
    106109
  • trunk/src/wp-content/themes/twentyeleven/style.css

    r43051 r43125  
    22992299    font-size: 12px;
    23002300}
     2301#respond #wp-comment-cookies-consent {
     2302    margin: 0 10px 0 0;
     2303}
    23012304p.comment-form-comment {
    23022305    margin: 0;
  • trunk/src/wp-content/themes/twentyfifteen/rtl.css

    r40839 r43125  
    401401}
    402402
     403.comment-form #wp-comment-cookies-consent {
     404    margin: 0 0 0 10px;
     405}
    403406
    404407/**
  • trunk/src/wp-content/themes/twentyfifteen/style.css

    r43051 r43125  
    24072407}
    24082408
     2409.comment-form #wp-comment-cookies-consent {
     2410    margin: 0 10px 0 0;
     2411}
     2412
     2413.comment-form .comment-form-cookies-consent label {
     2414    display: inline;
     2415    font-size: 12px;
     2416    font-size: 1.2rem;
     2417    font-weight: normal;
     2418    letter-spacing: 0;
     2419    text-transform: none;
     2420}
    24092421
    24102422/**
     
    30413053    .logged-in-as,
    30423054    .comment-form label,
     3055    .comment-form .comment-form-cookies-consent label,
    30433056    .form-allowed-tags,
    30443057    .site-info,
     
    36703683    .logged-in-as,
    36713684    .comment-form label,
     3685    .comment-form .comment-form-cookies-consent label,
    36723686    .form-allowed-tags,
    36733687    .site-info,
     
    42894303    .logged-in-as,
    42904304    .comment-form label,
     4305    .comment-form .comment-form-cookies-consent label,
    42914306    .form-allowed-tags,
    42924307    .site-info,
     
    49464961    .logged-in-as,
    49474962    .comment-form label,
     4963    .comment-form .comment-form-cookies-consent label,
    49484964    .form-allowed-tags,
    49494965    .site-info,
     
    54875503    .logged-in-as,
    54885504    .comment-form label,
     5505    .comment-form .comment-form-cookies-consent label,
    54895506    .form-allowed-tags,
    54905507    .site-info,
  • trunk/src/wp-content/themes/twentyfourteen/rtl.css

    r43051 r43125  
    289289}
    290290
     291.comment-form #wp-comment-cookies-consent {
     292    margin: 0 0 0 10px;
     293}
    291294
    292295/**
  • trunk/src/wp-content/themes/twentyfourteen/style.css

    r43051 r43125  
    21872187}
    21882188
     2189.comment-form #wp-comment-cookies-consent {
     2190    margin: 0 10px 0 0;
     2191}
     2192
     2193.comment-form .comment-form-cookies-consent label {
     2194    display: inline;
     2195}
    21892196
    21902197/**
  • trunk/src/wp-content/themes/twentyseventeen/rtl.css

    r41754 r43125  
    198198.form-submit {
    199199    text-align: left;
     200}
     201
     202.comment-form #wp-comment-cookies-consent {
     203    margin: 0 0 0 10px;
    200204}
    201205
  • trunk/src/wp-content/themes/twentyseventeen/style.css

    r43051 r43125  
    25062506}
    25072507
     2508.comment-form #wp-comment-cookies-consent {
     2509    margin: 0 10px 0 0;
     2510}
     2511
     2512.comment-form .comment-form-cookies-consent label {
     2513    display: inline;
     2514}
     2515
    25082516/*--------------------------------------------------------------
    2509251715.0 Widgets
  • trunk/src/wp-content/themes/twentysixteen/rtl.css

    r43051 r43125  
    401401}
    402402
     403.comment-form #wp-comment-cookies-consent {
     404    margin: 0 0 0 10px;
     405}
     406
     407.comment-form .comment-form-cookies-consent label {
     408    font-family: Arial, Tahoma, sans-serif;
     409}
    403410
    404411/**
  • trunk/src/wp-content/themes/twentysixteen/style.css

    r43051 r43125  
    23952395}
    23962396
     2397.comment-form #wp-comment-cookies-consent {
     2398    margin: 0 10px 0 0;
     2399}
     2400
     2401.comment-form .comment-form-cookies-consent label {
     2402    display: inline;
     2403    font-family: Merriweather, Georgia, serif;
     2404    letter-spacing: 0;
     2405    text-transform: none;
     2406}
    23972407
    23982408/**
  • trunk/src/wp-content/themes/twentyten/rtl.css

    r41756 r43125  
    239239    margin: 0 0 0 48px;
    240240}
     241#respond #wp-comment-cookies-consent {
     242    margin: 0 0 0 10px;
     243}
    241244
    242245/* =Widget Areas
  • trunk/src/wp-content/themes/twentyten/style.css

    r43051 r43125  
    11331133    width: auto;
    11341134}
     1135#respond #wp-comment-cookies-consent {
     1136    width: auto;
     1137    margin: 0 10px 0 0;
     1138}
    11351139
    11361140
  • trunk/src/wp-content/themes/twentythirteen/rtl.css

    r43051 r43125  
    496496}
    497497
     498.comment-form #wp-comment-cookies-consent {
     499    margin: 0 0 0 10px;
     500}
     501
    498502.form-allowed-tags code {
    499503    margin-left: auto;
  • trunk/src/wp-content/themes/twentythirteen/style.css

    r43051 r43125  
    23922392}
    23932393
     2394.comment-form #wp-comment-cookies-consent {
     2395    margin: 0 10px 0 0;
     2396}
     2397
    23942398.form-allowed-tags,
    23952399.form-allowed-tags code {
  • trunk/src/wp-content/themes/twentytwelve/rtl.css

    r32315 r43125  
    135135    margin: -1.285714286rem -1.142857143rem 0 0;
    136136}
     137#respond #wp-comment-cookies-consent {
     138    margin: 0 0 0 10px;
     139}
    137140
    138141
  • trunk/src/wp-content/themes/twentytwelve/style.css

    r43051 r43125  
    13611361    color: #5e5e5e;
    13621362}
     1363#respond #wp-comment-cookies-consent {
     1364    margin: 0 10px 0 0;
     1365}
     1366#respond .comment-form-cookies-consent label {
     1367    display: inline;
     1368}
    13631369.required {
    13641370    color: red;
  • trunk/src/wp-includes/comment-template.php

    r43123 r43125  
    22692269        'url'     => '<p class="comment-form-url"><label for="url">' . __( 'Website' ) . '</label> ' .
    22702270                     '<input id="url" name="url" ' . ( $html5 ? 'type="url"' : 'type="text"' ) . ' value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" maxlength="200" /></p>',
    2271         'cookies' => '<p class="comment-form-cookies-consent"><label for="wp-comment-cookies-consent">' .
    2272                      '<input id="wp-comment-cookies-consent" name="wp-comment-cookies-consent" type="checkbox" value="yes"' . $consent . ' />' .
    2273                      __( 'Save my name, email, and website in this browser for the next time I comment.' ) . '</label></p>',
     2271        'cookies' => '<p class="comment-form-cookies-consent"><input id="wp-comment-cookies-consent" name="wp-comment-cookies-consent" type="checkbox" value="yes"' . $consent . ' />' .
     2272                     '<label for="wp-comment-cookies-consent">' . __( 'Save my name, email, and website in this browser for the next time I comment.' ) . '</label></p>',
    22742273    );
    22752274
Note: See TracChangeset for help on using the changeset viewer.