From 926f3f84a5e4625555cff9277cb83b63d55e12f7 Mon Sep 17 00:00:00 2001 From: Jb Audras Date: Mon, 12 Sep 2022 23:32:57 +0000 Subject: [PATCH] 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. git-svn-id: https://develop.svn.wordpress.org/trunk@54138 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/blocks.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/blocks.php b/src/wp-includes/blocks.php index 0d21094b0d..2af0dceeea 100644 --- a/src/wp-includes/blocks.php +++ b/src/wp-includes/blocks.php @@ -1256,7 +1256,7 @@ function get_query_pagination_arrow( $block, $is_next ) { $arrow_attribute = $block->context['paginationArrow']; $arrow = $arrow_map[ $block->context['paginationArrow'] ][ $pagination_type ]; $arrow_classes = "wp-block-query-pagination-$pagination_type-arrow is-arrow-$arrow_attribute"; - return "$arrow"; + return ""; } return null; } @@ -1405,7 +1405,7 @@ function get_comments_pagination_arrow( $block, $pagination_type = 'next' ) { $arrow_attribute = $block->context['comments/paginationArrow']; $arrow = $arrow_map[ $block->context['comments/paginationArrow'] ][ $pagination_type ]; $arrow_classes = "wp-block-comments-pagination-$pagination_type-arrow is-arrow-$arrow_attribute"; - return "$arrow"; + return ""; } return null; }