提交 0e43c7a4 编写于 作者: A Alex Ross

Include description in custom tree aria label

Part of #108480
上级 7dca88de
......@@ -399,7 +399,18 @@ export class TreeView extends Disposable implements ITreeView {
return element.accessibilityInformation.label;
}
return isString(element.tooltip) ? element.tooltip : element.label ? element.label.label : '';
if (isString(element.tooltip)) {
return element.tooltip;
} else {
let buildAriaLabel: string = '';
if (element.label) {
buildAriaLabel += element.label.label + ' ';
}
if (element.description) {
buildAriaLabel += element.description;
}
return buildAriaLabel;
}
},
getRole(element: ITreeItem): string | undefined {
return element.accessibilityInformation?.role ?? 'treeitem';
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册