diff --git a/source/wp-content/themes/wporg-showcase-2022/src/site-meta-list/index.php b/source/wp-content/themes/wporg-showcase-2022/src/site-meta-list/index.php index e4955978..97e62e6b 100644 --- a/source/wp-content/themes/wporg-showcase-2022/src/site-meta-list/index.php +++ b/source/wp-content/themes/wporg-showcase-2022/src/site-meta-list/index.php @@ -96,15 +96,29 @@ function( $field ) use ( $attributes ) { } foreach ( $meta_fields as $field ) { - $value = get_value( $field['type'], $field['key'], $block->context['postId'] ); + list('type' => $type, 'key' => $key, 'label' => $label) = $field; + $value = get_value( $type, $key, $block->context['postId'] ); + $aria_label = $label . ': ' . wp_strip_all_tags( $value ); + + // Hide these from values from screen readers as they do not contain links. + $aria_hide_value = in_array( $key, array( 'country', 'published' ) ) + ? ' aria-hidden="true"' + : ''; + + $html_label = $show_label + ? sprintf( '%1$s', $label ) + : ''; if ( ! empty( $value ) ) { $list_items[] = sprintf( - '