Skip to content

Commit

Permalink
switch to using a description rather than another label
Browse files Browse the repository at this point in the history
  • Loading branch information
scruffian committed Jan 30, 2023
1 parent c87eb2e commit 92fbea9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const BLOCK_LIST_ITEM_HEIGHT = 36;
* @param {boolean} props.isExpanded Flag to determine whether nested levels are expanded by default.
* @param {boolean} props.selectBlockInCanvas Flag to determine whether the list view should be a block selection mechanism.
* @param {Object} props.LeafMoreMenu Optional more menu substitution.
* @param {string} props.label Optional accessible name for the tree grid component.
* @param {string} props.description Optional accessible description for the tree grid component.
* @param {Object} ref Forwarded ref
*/
function __ExperimentalOffCanvasEditor(
Expand All @@ -72,7 +72,7 @@ function __ExperimentalOffCanvasEditor(
isExpanded = false,
selectBlockInCanvas = true,
LeafMoreMenu,
label = __( 'Block navigation structure' ),
description = __( 'Block navigation structure' ),
},
ref
) {
Expand Down Expand Up @@ -213,12 +213,12 @@ function __ExperimentalOffCanvasEditor(
<TreeGrid
id={ id }
className="block-editor-list-view-tree"
aria-label={ label }
aria-label={ __( 'Block navigation structure' ) }
ref={ treeGridRef }
onCollapseRow={ collapseRow }
onExpandRow={ expandRow }
onFocusRow={ focusRow }
applicationAriaLabel={ label }
aria-description={ description }
>
<ListViewContext.Provider value={ contextValue }>
<ListViewBranch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const ExperimentMainContent = ( {
return <Spinner />;
}

const label = navigationMenu
const description = navigationMenu
? sprintf(
/* translators: %s: The name of a menu. */
__( 'Structure for navigation menu: %s' ),
Expand All @@ -68,7 +68,7 @@ const ExperimentMainContent = ( {
isExpanded={ true }
selectBlockInCanvas={ false }
LeafMoreMenu={ LeafMoreMenu }
label={ label }
description={ description }
/>
);
};
Expand Down

0 comments on commit 92fbea9

Please sign in to comment.