Skip to content

Commit 447f0aa

Browse files
committed
tweak tabs
1 parent 892a063 commit 447f0aa

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

src/aria/tabs/tabs.ts

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ export class Tabs {
120120
host: {
121121
'role': 'tablist',
122122
'class': 'ng-tablist',
123-
'[attr.tabindex]': 'tabindex()',
124-
'[attr.aria-disabled]': 'disabled()',
123+
'[attr.tabindex]': '_pattern.tabindex()',
124+
'[attr.aria-disabled]': '_pattern.disabled()',
125125
'[attr.aria-orientation]': 'orientation()',
126126
'[attr.aria-activedescendant]': 'activedescendant()',
127127
'(keydown)': '_pattern.onKeydown($event)',
@@ -179,9 +179,6 @@ export class TabList implements OnInit, OnDestroy {
179179
/** Whether selection should follow focus. */
180180
readonly followFocus = computed(() => this._pattern.followFocus());
181181

182-
/** The tabindex of the tablist. */
183-
readonly tabindex = computed(() => this._pattern.tabindex());
184-
185182
/** The TabList UIPattern. */
186183
readonly _pattern: TabListPattern = new TabListPattern({
187184
...this,
@@ -236,9 +233,9 @@ export class TabList implements OnInit, OnDestroy {
236233
'class': 'ng-tab',
237234
'[attr.data-active]': 'active()',
238235
'[attr.id]': '_pattern.id()',
239-
'[attr.tabindex]': 'tabindex()',
236+
'[attr.tabindex]': '_pattern.tabindex()',
240237
'[attr.aria-selected]': 'selected()',
241-
'[attr.aria-disabled]': 'disabled()',
238+
'[attr.aria-disabled]': '_pattern.disabled()',
242239
'[attr.aria-controls]': '_pattern.controls()',
243240
},
244241
})
@@ -281,9 +278,6 @@ export class Tab implements HasElement, OnInit, OnDestroy {
281278
/** Whether the tab is selected. */
282279
readonly selected = computed(() => this._pattern.selected());
283280

284-
/** The tabindex of the tab. */
285-
readonly tabindex = computed(() => this._pattern.tabindex());
286-
287281
/** The Tab UIPattern. */
288282
readonly _pattern: TabPattern = new TabPattern({
289283
...this,
@@ -317,7 +311,7 @@ export class Tab implements HasElement, OnInit, OnDestroy {
317311
'role': 'tabpanel',
318312
'class': 'ng-tabpanel',
319313
'[attr.id]': '_pattern.id()',
320-
'[attr.tabindex]': 'tabindex()',
314+
'[attr.tabindex]': '_pattern.tabindex()',
321315
'[attr.inert]': 'hidden() ? true : null',
322316
'[attr.aria-labelledby]': '_pattern.labelledBy()',
323317
},
@@ -347,9 +341,6 @@ export class TabPanel implements OnInit, OnDestroy {
347341
/** Whether the tab panel is hidden. */
348342
readonly hidden = computed(() => this._pattern.hidden());
349343

350-
/** The tabindex of the tab panel. */
351-
readonly tabindex = computed(() => this._pattern.tabindex());
352-
353344
/** The TabPanel UIPattern. */
354345
readonly _pattern: TabPanelPattern = new TabPanelPattern({
355346
...this,

0 commit comments

Comments
 (0)