Skip to content

Commit 0e85248

Browse files
committed
tweak tree
1 parent 447f0aa commit 0e85248

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

src/aria/tree/tree.ts

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ function sortDirectives(a: HasElement, b: HasElement) {
7171
'[attr.id]': 'id()',
7272
'[attr.aria-orientation]': 'orientation()',
7373
'[attr.aria-multiselectable]': 'multi()',
74-
'[attr.aria-disabled]': 'disabled()',
74+
'[attr.aria-disabled]': '_pattern.disabled()',
7575
'[attr.aria-activedescendant]': 'activedescendant()',
76-
'[tabindex]': 'tabindex()',
76+
'[tabindex]': '_pattern.tabindex()',
7777
'(keydown)': '_pattern.onKeydown($event)',
7878
'(pointerdown)': '_pattern.onPointerdown($event)',
7979
'(focusin)': 'onFocus()',
@@ -141,9 +141,6 @@ export class Tree<V> {
141141
/** Whether the tree selection follows focus. */
142142
readonly followFocus = computed(() => this._pattern.followFocus());
143143

144-
/** The tabindex of the tree. */
145-
readonly tabindex = computed(() => this._pattern.tabindex());
146-
147144
/** All currently visible tree items. An item is visible if their parent is expanded. */
148145
readonly visibleItems = computed(() => this._pattern.visible());
149146

@@ -236,11 +233,11 @@ export class Tree<V> {
236233
'[attr.aria-expanded]': 'expanded()',
237234
'[attr.aria-selected]': 'selected()',
238235
'[attr.aria-current]': 'current()',
239-
'[attr.aria-disabled]': 'disabled()',
236+
'[attr.aria-disabled]': '_pattern.disabled()',
240237
'[attr.aria-level]': 'level()',
241-
'[attr.aria-setsize]': 'setsize()',
238+
'[attr.aria-setsize]': '_pattern.setsize()',
242239
'[attr.aria-posinset]': 'posinset()',
243-
'[attr.tabindex]': 'tabindex()',
240+
'[attr.tabindex]': '_pattern.tabindex()',
244241
},
245242
})
246243
export class TreeItem<V> extends DeferredContentAware implements OnInit, OnDestroy, HasElement {
@@ -302,12 +299,6 @@ export class TreeItem<V> extends DeferredContentAware implements OnInit, OnDestr
302299
/** Whether the item is selected. */
303300
readonly selected = computed(() => this._pattern.selected());
304301

305-
/** The number of items under the same parent at the same level. */
306-
readonly setsize = computed(() => this._pattern.setsize());
307-
308-
/** The tabindex of the item. */
309-
readonly tabindex = computed(() => this._pattern.tabindex());
310-
311302
/** Whether this item is visible. */
312303
readonly visible = computed(() => this._pattern.visible());
313304

0 commit comments

Comments
 (0)