Make WordPress Core


Ignore:
Timestamp:
05/02/2018 09:59:59 PM (7 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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.