From 7f99005c6fe3bbf594eeb1638e1cad02b96f20a5 Mon Sep 17 00:00:00 2001 From: Gerardo Date: Wed, 15 Feb 2023 09:07:21 +0100 Subject: [PATCH] Mobile - Set accessibility label prop for BlockTypesList instances --- .../src/components/block-types-list/index.native.js | 4 ++-- .../src/components/inserter/block-types-tab.native.js | 2 ++ .../src/components/inserter/reusable-blocks-tab.native.js | 2 ++ .../src/components/inserter/search-results.native.js | 2 ++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/block-editor/src/components/block-types-list/index.native.js b/packages/block-editor/src/components/block-types-list/index.native.js index 7e67d6d051efd..450e45220436e 100644 --- a/packages/block-editor/src/components/block-types-list/index.native.js +++ b/packages/block-editor/src/components/block-types-list/index.native.js @@ -20,7 +20,6 @@ import { usePreferredColorScheme, usePreferredColorSchemeStyle, } from '@wordpress/compose'; -import { __ } from '@wordpress/i18n'; /** * Internal dependencies @@ -33,6 +32,7 @@ export default function BlockTypesList( { name, sections, onSelect, + label, listProps, initialNumToRender = 3, } ) { @@ -155,7 +155,7 @@ export default function BlockTypesList( { ); } diff --git a/packages/block-editor/src/components/inserter/reusable-blocks-tab.native.js b/packages/block-editor/src/components/inserter/reusable-blocks-tab.native.js index 825169e17315f..d50a5a99f2728 100644 --- a/packages/block-editor/src/components/inserter/reusable-blocks-tab.native.js +++ b/packages/block-editor/src/components/inserter/reusable-blocks-tab.native.js @@ -2,6 +2,7 @@ * WordPress dependencies */ import { useSelect } from '@wordpress/data'; +import { __ } from '@wordpress/i18n'; /** * Internal dependencies @@ -31,6 +32,7 @@ function ReusableBlocksTab( { onSelect, rootClientId, listProps } ) { sections={ sections } onSelect={ onSelect } listProps={ listProps } + label={ __( 'Reusable blocks' ) } /> ); } diff --git a/packages/block-editor/src/components/inserter/search-results.native.js b/packages/block-editor/src/components/inserter/search-results.native.js index a32c6ecf1a1c3..bc951dac1de02 100644 --- a/packages/block-editor/src/components/inserter/search-results.native.js +++ b/packages/block-editor/src/components/inserter/search-results.native.js @@ -2,6 +2,7 @@ * WordPress dependencies */ import { useSelect } from '@wordpress/data'; +import { __ } from '@wordpress/i18n'; /** * Internal dependencies @@ -54,6 +55,7 @@ function InserterSearchResults( { sections={ [ createInserterSection( { key: 'search', items } ) ] } onSelect={ handleSelect } listProps={ listProps } + label={ __( 'Blocks' ) } /> ); }