Making WordPress.org

Ticket #1819: 1819.patch

File 1819.patch, 2.3 KB (added by keesiemeijer, 9 years ago)

Add screen reader text to voting buttons

  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/template-tags.php

     
    136136
    137137                        <li id="comment-<?php comment_ID(); ?>" <?php comment_class( $comment_class ); ?>>
    138138                        <article id="div-comment-<?php comment_ID(); ?>" class="comment-body">
     139                                <a href="#comment-content-<?php echo $comment->comment_ID; ?>" class="screen-reader-text"><?php _e( 'Skip to note content', 'wporg' ); ?></a>
    139140                                <header class="comment-meta">
    140141                                        <?php DevHub_User_Contributed_Notes_Voting::show_voting(); ?>
    141142                                        <div class="comment-author vcard">
     
    184185                                </header>
    185186                                <!-- .comment-metadata -->
    186187
    187                                 <div class="comment-content">
     188                                <div class="comment-content" id="comment-content-<?php echo $comment->comment_ID; ?>">
    188189                                        <?php comment_text(); ?>
    189190                                </div>
    190191                                <!-- .comment-content -->
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/user-content-voting.php

     
    296296                }
    297297                echo '">';
    298298                echo '<span class="dashicons dashicons-arrow-up"></span>';
     299                echo '<span class="screen-reader-text">' . $title .  '</span>';
    299300                echo "</{$tag}>";
    300301
    301302                // Total count
     
    307308                echo '<span '
    308309                        . 'class="user-note-voting-count ' . esc_attr( $class ) . '" '
    309310                        . 'title="' . esc_attr( $title ) . '">'
     311                        . '<span class="screen-reader-text">' . __( 'Vote results for this note: ', 'wporg' ) .  '</span>'
    310312                        . self::count_votes( $comment_id, 'difference' )
    311313                        . '</span>';
    312314
     
    334336                }
    335337                echo '">';
    336338                echo '<span class="dashicons dashicons-arrow-down"></span>';
     339                echo '<span class="screen-reader-text">' . $title .  '</span>';
    337340                echo "</{$tag}>";
    338341
    339342                echo '</div>';