WordPress.org

Make WordPress Core

Changeset 43130 for branches/4.9


Ignore:
Timestamp:
05/02/2018 10:14:59 PM (2 years ago)
Author:
SergeyBiryukov
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.
Merges [43125] to the 4.9 branch.
Fixes #43436.

Location:
branches/4.9
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • branches/4.9

  • branches/4.9/src/wp-content/themes/twentyeleven/rtl.css

    r40839 r43130  
    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
  • branches/4.9/src/wp-content/themes/twentyeleven/style.css

    r42105 r43130  
    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;
  • branches/4.9/src/wp-content/themes/twentyfifteen/rtl.css

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

    r42105 r43130  
    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/**
     
    30343046    .logged-in-as,
    30353047    .comment-form label,
     3048    .comment-form .comment-form-cookies-consent label,
    30363049    .form-allowed-tags,
    30373050    .site-info,
     
    36633676    .logged-in-as,
    36643677    .comment-form label,
     3678    .comment-form .comment-form-cookies-consent label,
    36653679    .form-allowed-tags,
    36663680    .site-info,
     
    42824296    .logged-in-as,
    42834297    .comment-form label,
     4298    .comment-form .comment-form-cookies-consent label,
    42844299    .form-allowed-tags,
    42854300    .site-info,
     
    49394954    .logged-in-as,
    49404955    .comment-form label,
     4956    .comment-form .comment-form-cookies-consent label,
    49414957    .form-allowed-tags,
    49424958    .site-info,
     
    54805496    .logged-in-as,
    54815497    .comment-form label,
     5498    .comment-form .comment-form-cookies-consent label,
    54825499    .form-allowed-tags,
    54835500    .site-info,
  • branches/4.9/src/wp-content/themes/twentyfourteen/rtl.css

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

    r42105 r43130  
    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/**
  • branches/4.9/src/wp-content/themes/twentyseventeen/rtl.css

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

    r42882 r43130  
    24982498}
    24992499
     2500.comment-form #wp-comment-cookies-consent {
     2501    margin: 0 10px 0 0;
     2502}
     2503
     2504.comment-form .comment-form-cookies-consent label {
     2505    display: inline;
     2506}
     2507
    25002508/*--------------------------------------------------------------
    2501250915.0 Widgets
  • branches/4.9/src/wp-content/themes/twentysixteen/rtl.css

    r41756 r43130  
    400400}
    401401
     402.comment-form #wp-comment-cookies-consent {
     403    margin: 0 0 0 10px;
     404}
     405
     406.comment-form .comment-form-cookies-consent label {
     407    font-family: Arial, Tahoma, sans-serif;
     408}
    402409
    403410/**
  • branches/4.9/src/wp-content/themes/twentysixteen/style.css

    r42105 r43130  
    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/**
  • branches/4.9/src/wp-content/themes/twentyten/rtl.css

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

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

    r40839 r43130  
    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;
  • branches/4.9/src/wp-content/themes/twentythirteen/style.css

    r42105 r43130  
    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 {
  • branches/4.9/src/wp-content/themes/twentytwelve/rtl.css

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

    r42105 r43130  
    13551355    color: #5e5e5e;
    13561356}
     1357#respond #wp-comment-cookies-consent {
     1358    margin: 0 10px 0 0;
     1359}
     1360#respond .comment-form-cookies-consent label {
     1361    display: inline;
     1362}
    13571363.required {
    13581364    color: red;
  • branches/4.9/src/wp-includes/comment-template.php

    r43129 r43130  
    22032203        'url'     => '<p class="comment-form-url"><label for="url">' . __( 'Website' ) . '</label> ' .
    22042204                     '<input id="url" name="url" ' . ( $html5 ? 'type="url"' : 'type="text"' ) . ' value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" maxlength="200" /></p>',
    2205         'cookies' => '<p class="comment-form-cookies-consent"><label for="wp-comment-cookies-consent">' .
    2206                      '<input id="wp-comment-cookies-consent" name="wp-comment-cookies-consent" type="checkbox" value="yes"' . $consent . ' />' .
    2207                      __( 'Save my name, email, and website in this browser for the next time I comment.' ) . '</label></p>',
     2205        'cookies' => '<p class="comment-form-cookies-consent"><input id="wp-comment-cookies-consent" name="wp-comment-cookies-consent" type="checkbox" value="yes"' . $consent . ' />' .
     2206                     '<label for="wp-comment-cookies-consent">' . __( 'Save my name, email, and website in this browser for the next time I comment.' ) . '</label></p>',
    22082207    );
    22092208
Note: See TracChangeset for help on using the changeset viewer.