• In twentyeleven, on the front-page, in the list of posts, there is the little balloon that shows the number of replies to a post. This is handled in the code by wp-content/themes/twentyeleven/content.php around lines 27-30.

    Unfortunately, a screen-reader will only read the number of comments as the number, since the latest code doesn’t add screen-reader text with the word “replies”.

    I would like to suggest a diff that will add the missing words. This is required in some countries by law, BTW:

    diff –git a/wp-content/themes/twentyeleven/content.php b/wp-content/themes/twentyeleven/content.php
    index 7da6cc5..a045c91 100644
    — a/wp-content/themes/twentyeleven/content.php
    +++ b/wp-content/themes/twentyeleven/content.php
    @@ -27,7 +27,9 @@

    <?php if ( comments_open() && ! post_password_required() ) : ?>
    <div class=”comments-link”>
    – <?php comments_popup_link( ‘<span class=”leave-reply”>’ . __( ‘Reply’, ‘twentyeleven’ ) . ‘</span>’, _x( ‘1’, ‘comments number’, ‘twentyeleven’ ), _x( ‘%’, ‘comments number’, ‘twentyeleven’ ) ); ?>
    + <?php comments_popup_link( ‘<span class=”leave-reply”>’ . __( ‘Reply’, ‘twentyeleven’ ) . ‘</span>’,
    + __( ‘<b>1</b>’, ‘twentyeleven’ ) . ‘<span class=”screen-reader-text”>’ . __( ‘<b>1</b> Reply’, ‘twentyeleven’ ) . ‘</span>’,
    + __( ‘<b>%</b> Replies’, ‘twentyeleven’ ) ); ?></span>
    </div>
    <?php endif; ?>
    </header><!– .entry-header –>

    Thanks,

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Missing screen-reader text for replies in content.php’ is closed to new replies.