Ticket #21897: 21897.5.diff

File 21897.5.diff, 2.5 KB (added by MikeHansenMe, 8 months ago)

couple additional lines of css to move the asterisk (*) to the left of the label while being inside the label for screen readers

  • wp-includes/comment-template.php

     
    15211521        $req = get_option( 'require_name_email' ); 
    15221522        $aria_req = ( $req ? " aria-required='true'" : '' ); 
    15231523        $fields =  array( 
    1524                 'author' => '<p class="comment-form-author">' . '<label for="author">' . __( 'Name' ) . '</label> ' . ( $req ? '<span class="required">*</span>' : '' ) . 
     1524                'author' => '<p class="comment-form-author">' . '<label for="author">' . __( 'Name' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label> ' . 
    15251525                            '<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' /></p>', 
    1526                 'email'  => '<p class="comment-form-email"><label for="email">' . __( 'Email' ) . '</label> ' . ( $req ? '<span class="required">*</span>' : '' ) . 
     1526                'email'  => '<p class="comment-form-email"><label for="email">' . __( 'Email' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label> ' . 
    15271527                            '<input id="email" name="email" type="text" value="' . esc_attr(  $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . ' /></p>', 
    15281528                'url'    => '<p class="comment-form-url"><label for="url">' . __( 'Website' ) . '</label>' . 
    15291529                            '<input id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" /></p>', 
  • wp-content/themes/twentyeleven/style.css

     
    21232123        font-weight: bold; 
    21242124        left: 75%; 
    21252125        position: absolute; 
    2126         top: 45px; 
    21272126        z-index: 1; 
    21282127} 
    21292128#respond .comment-notes, 
  • wp-content/themes/twentytwelve/style.css

     
    12151215#respond form label { 
    12161216        display: block; 
    12171217        line-height: 1.714285714; 
     1218        position: relative; 
    12181219} 
    12191220#respond form input[type="text"], 
    12201221#respond form textarea { 
     
    12361237} 
    12371238.required { 
    12381239        color: red; 
     1240        position: absolute; 
     1241        left: -10px; 
    12391242} 
    1240 label ~ span.required { 
    1241         display: block; 
    1242         float: left; 
    1243         margin: -18px 0 0 -16px; 
    1244         margin: -1.285714286rem 0 0 -1.142857143rem; 
    1245 } 
    12461243 
    12471244 
    12481245/* =Front page template