From 829fa0d9c87d4c3b72593d3845192cc167f7a96e Mon Sep 17 00:00:00 2001 From: scruffian Date: Tue, 18 Apr 2023 21:26:44 +0100 Subject: [PATCH] List View: Add aria-description --- packages/block-editor/src/components/list-view/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/block-editor/src/components/list-view/index.js b/packages/block-editor/src/components/list-view/index.js index 6e627a5b8b1d65..5b028c52bb937a 100644 --- a/packages/block-editor/src/components/list-view/index.js +++ b/packages/block-editor/src/components/list-view/index.js @@ -63,6 +63,7 @@ export const BLOCK_LIST_ITEM_HEIGHT = 36; * @param {?boolean} props.showAppender Flag to show or hide the block appender. Defaults to `false`. * @param {?ComponentType} props.blockSettingsMenu Optional more menu substitution. Defaults to the standard `BlockSettingsDropdown` component. * @param {string} props.rootClientId The client id of the root block from which we determine the blocks to show in the list. + * @param {string} props.description Optional accessible description for the tree grid component. * @param {Ref} ref Forwarded ref */ function ListViewComponent( @@ -74,6 +75,7 @@ function ListViewComponent( showAppender = false, blockSettingsMenu: BlockSettingsMenu = BlockSettingsDropdown, rootClientId, + description, }, ref ) { @@ -229,6 +231,8 @@ function ListViewComponent( onExpandRow={ expandRow } onFocusRow={ focusRow } applicationAriaLabel={ __( 'Block navigation structure' ) } + // eslint-disable-next-line jsx-a11y/aria-props + aria-description={ description } >