mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 04:40:26 +00:00
Comments: Move comment consent input outside the label for a11y.
Non-wrapping `label`s 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. git-svn-id: https://develop.svn.wordpress.org/trunk@43125 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2268,9 +2268,8 @@ function comment_form( $args = array(), $post_id = null ) {
|
||||
'<input id="email" name="email" ' . ( $html5 ? 'type="email"' : 'type="text"' ) . ' value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30" maxlength="100" aria-describedby="email-notes"' . $html_req . ' /></p>',
|
||||
'url' => '<p class="comment-form-url"><label for="url">' . __( 'Website' ) . '</label> ' .
|
||||
'<input id="url" name="url" ' . ( $html5 ? 'type="url"' : 'type="text"' ) . ' value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" maxlength="200" /></p>',
|
||||
'cookies' => '<p class="comment-form-cookies-consent"><label for="wp-comment-cookies-consent">' .
|
||||
'<input id="wp-comment-cookies-consent" name="wp-comment-cookies-consent" type="checkbox" value="yes"' . $consent . ' />' .
|
||||
__( 'Save my name, email, and website in this browser for the next time I comment.' ) . '</label></p>',
|
||||
'cookies' => '<p class="comment-form-cookies-consent"><input id="wp-comment-cookies-consent" name="wp-comment-cookies-consent" type="checkbox" value="yes"' . $consent . ' />' .
|
||||
'<label for="wp-comment-cookies-consent">' . __( 'Save my name, email, and website in this browser for the next time I comment.' ) . '</label></p>',
|
||||
);
|
||||
|
||||
$required_text = sprintf( ' ' . __( 'Required fields are marked %s' ), '<span class="required">*</span>' );
|
||||
|
||||
Reference in New Issue
Block a user