diff --git a/Composer/packages/client/src/components/ProjectTree/ExpandableNode.tsx b/Composer/packages/client/src/components/ProjectTree/ExpandableNode.tsx index 7ebd2cd14e..6abbf4252a 100644 --- a/Composer/packages/client/src/components/ProjectTree/ExpandableNode.tsx +++ b/Composer/packages/client/src/components/ProjectTree/ExpandableNode.tsx @@ -76,7 +76,7 @@ export const ExpandableNode = ({ onKeyDown={handleKey} > {/* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/no-noninteractive-tabindex */} -
  • +
  • {summary}
  • {children != null && isExpanded &&
    {children}
    } diff --git a/Composer/packages/client/src/components/ProjectTree/treeItem.tsx b/Composer/packages/client/src/components/ProjectTree/treeItem.tsx index e205e6bcb3..b35a491760 100644 --- a/Composer/packages/client/src/components/ProjectTree/treeItem.tsx +++ b/Composer/packages/client/src/components/ProjectTree/treeItem.tsx @@ -427,7 +427,7 @@ export const TreeItem: React.FC = ({ }) => { const [thisItemSelected, setThisItemSelected] = useState(false); - const ariaLabel = `${objectNames[itemType]()} ${link.displayName}`; + const ariaLabel = `${link.displayName} ${objectNames[itemType]()}`; const dataTestId = `${dialogName ?? '$Root'}_${link.displayName}`; const isExternal = Boolean(link.href); @@ -470,8 +470,18 @@ export const TreeItem: React.FC = ({ tabIndex={0} onBlur={item.onBlur} onFocus={item.onFocus} + onKeyDown={ + onSelect + ? (e) => { + if (e.key === 'Enter') { + onSelect(link); + e.stopPropagation(); + } + } + : undefined + } > -
    +
    {item.itemType != null && TreeIcons[item.itemType] != null && ( = ({ outline: 'none', }, }} - tabIndex={-1} /> )} @@ -564,11 +573,8 @@ export const TreeItem: React.FC = ({ return (
    { @@ -576,16 +582,6 @@ export const TreeItem: React.FC = ({ } : undefined } - onKeyDown={ - onSelect - ? (e) => { - if (e.key === 'Enter') { - onSelect(link); - e.stopPropagation(); - } - } - : undefined - } >