Skip to content

Commit 9d17f47

Browse files
committed
fix: adds a label to the caret for menu items
1 parent 4eeb9aa commit 9d17f47

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/packages/core/tree/tree-item/tree-item-base/tree-item-element-base.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ export abstract class UmbTreeItemElementBase<TreeItemModelType extends UmbTreeIt
109109
// Note: Currently we want to prevent opening when the item is in a selectable context, but this might change in the future.
110110
// If we like to be able to open items in selectable context, then we might want to make it as a menu item action, so you have to click ... and chose an action called 'Edit'
111111
override render() {
112+
const label = this.localize.string(this._item?.name || '');
112113
return html`
113114
<uui-menu-item
114115
@show-children=${this._onShowChildren}
@@ -120,7 +121,8 @@ export abstract class UmbTreeItemElementBase<TreeItemModelType extends UmbTreeIt
120121
?selected=${this._isSelected}
121122
.loading=${this._isLoading}
122123
.hasChildren=${this._hasChildren}
123-
label="${ifDefined(this.localize.string(this._item?.name || ''))}"
124+
.caretLabel=${this.localize.term('visuallyHiddenTexts_expandChildItems') + ' ' + label}
125+
label=${label}
124126
href="${ifDefined(this._isSelectableContext ? undefined : this._href)}">
125127
${this.renderIconContainer()} ${this.renderLabel()} ${this.#renderActions()} ${this.#renderChildItems()}
126128
<slot></slot>

0 commit comments

Comments
 (0)