Use aria-labelledby

Use aria-labelledby + heading instead of aria-label. (For a discussion see #1063.)
This commit is contained in:
IanDelMar 2019-12-14 08:29:21 +01:00
parent bf792512ce
commit ae43f9b620
1 changed files with 5 additions and 1 deletions

View File

@ -33,7 +33,11 @@ if ( ! function_exists( 'understrap_pagination' ) ) {
?>
<nav aria-label="<?php echo $args['screen_reader_text']; ?>">
<nav aria-labelledby="posts-nav-label">
<h2 id="posts-nav-label" class="sr-only">
<?php echo esc_html( $args['screen_reader_text'] ); ?>
</h2>
<ul class="<?php echo esc_attr( $class ); ?>">