Editor: Hide query loop pagination link arrows from assistive technology.
This changeset adss an `aria-hidden="true"` attribute to the optional arrows/chevron characters to the Query Loop and to the Comments Query Loop blocks pagination links. These characters are text, so they're read out by assistive technologies. For better accessibility, it's best to reduce noise for screen reader users and prevent them to be rendered, using the `aria-hidden="true"` attribute. Follow-up to [52057]. Props afercia, sabernhardt, kamig478, zieladam, audrasjb, joedolson, costdev. Fixes #56067. Built from https://develop.svn.wordpress.org/trunk@54138 git-svn-id: http://core.svn.wordpress.org/trunk@53697 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
43b406a5ee
commit
7c4a64e67b
|
@ -1256,7 +1256,7 @@ function get_query_pagination_arrow( $block, $is_next ) {
|
||||||
$arrow_attribute = $block->context['paginationArrow'];
|
$arrow_attribute = $block->context['paginationArrow'];
|
||||||
$arrow = $arrow_map[ $block->context['paginationArrow'] ][ $pagination_type ];
|
$arrow = $arrow_map[ $block->context['paginationArrow'] ][ $pagination_type ];
|
||||||
$arrow_classes = "wp-block-query-pagination-$pagination_type-arrow is-arrow-$arrow_attribute";
|
$arrow_classes = "wp-block-query-pagination-$pagination_type-arrow is-arrow-$arrow_attribute";
|
||||||
return "<span class='$arrow_classes'>$arrow</span>";
|
return "<span class='$arrow_classes' aria-hidden='true'>$arrow</span>";
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -1405,7 +1405,7 @@ function get_comments_pagination_arrow( $block, $pagination_type = 'next' ) {
|
||||||
$arrow_attribute = $block->context['comments/paginationArrow'];
|
$arrow_attribute = $block->context['comments/paginationArrow'];
|
||||||
$arrow = $arrow_map[ $block->context['comments/paginationArrow'] ][ $pagination_type ];
|
$arrow = $arrow_map[ $block->context['comments/paginationArrow'] ][ $pagination_type ];
|
||||||
$arrow_classes = "wp-block-comments-pagination-$pagination_type-arrow is-arrow-$arrow_attribute";
|
$arrow_classes = "wp-block-comments-pagination-$pagination_type-arrow is-arrow-$arrow_attribute";
|
||||||
return "<span class='$arrow_classes'>$arrow</span>";
|
return "<span class='$arrow_classes' aria-hidden='true'>$arrow</span>";
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '6.1-alpha-54137';
|
$wp_version = '6.1-alpha-54138';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue