Making WordPress.org


Ignore:
Timestamp:
07/10/2016 06:31:33 PM (8 years ago)
Author:
drewapicture
Message:

developer.wordpress.org: Add a 'Skip to note content' link to each user contributed note for the benefit of screen reader and keyboard users.

Note: While skip links are displayed during hover, active, and focus states, they are all absolutely positioned in the top left of the document which can result in their visibility falling outside the current viewport depending on scroll position.

Props keesiemeijer.
See #1819.

File:
1 edited

Legend:

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

    r3626 r3664  
    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(); ?>
     
    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>
Note: See TracChangeset for help on using the changeset viewer.