Skip to content

Commit

Permalink
add a label for screen reader in categories block (#33060)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hug0-Drelon authored Jun 29, 2021
1 parent 8a138c4 commit 8adb5be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/block-library/src/categories/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function render_block_core_categories( $attributes ) {
$id = 'wp-block-categories-' . $block_id;
$args['id'] = $id;
$args['show_option_none'] = __( 'Select Category' );
$wrapper_markup = '<div %1$s>%2$s</div>';
$wrapper_markup = '<div %1$s><label class="screen-reader-text" for="' . $id . '">' . __( 'Categories' ) . '</label>%2$s</div>';
$items_markup = wp_dropdown_categories( $args );
$type = 'dropdown';

Expand Down

0 comments on commit 8adb5be

Please sign in to comment.