@@ -15,7 +15,6 @@ import {
1515 linkedSignal ,
1616 signal ,
1717} from '../behaviors/signal-like/signal-like' ;
18- import { LabelControl , LabelControlOptionalInputs } from '../behaviors/label/label' ;
1918import { ListFocus } from '../behaviors/list-focus/list-focus' ;
2019import {
2120 ListNavigation ,
@@ -81,7 +80,7 @@ export class TabPattern {
8180}
8281
8382/** The required inputs for the tabpanel. */
84- export interface TabPanelInputs extends LabelControlOptionalInputs {
83+ export interface TabPanelInputs {
8584 /** A global unique identifier for the tabpanel. */
8685 id : SignalLike < string > ;
8786
@@ -94,29 +93,17 @@ export class TabPanelPattern {
9493 /** A global unique identifier for the tabpanel. */
9594 readonly id : SignalLike < string > ; // set from inputs
9695
97- /** Controls label for this tabpanel. */
98- readonly labelManager : LabelControl ;
99-
10096 /** Whether the tabpanel is hidden. */
10197 readonly hidden = computed ( ( ) => this . inputs . tab ( ) ?. expanded ( ) === false ) ;
10298
10399 /** The tab index of this tabpanel. */
104100 readonly tabIndex = computed ( ( ) => ( this . hidden ( ) ? - 1 : 0 ) ) ;
105101
106102 /** The aria-labelledby value for this tabpanel. */
107- readonly labelledBy = computed ( ( ) =>
108- this . labelManager . labelledBy ( ) . length > 0
109- ? this . labelManager . labelledBy ( ) . join ( ' ' )
110- : undefined ,
111- ) ;
103+ readonly labelledBy = computed ( ( ) => this . inputs . tab ( ) ?. id ( ) ) ;
112104
113105 constructor ( readonly inputs : TabPanelInputs ) {
114106 this . id = inputs . id ;
115-
116- this . labelManager = new LabelControl ( {
117- ...inputs ,
118- defaultLabelledBy : computed ( ( ) => ( this . inputs . tab ( ) ? [ this . inputs . tab ( ) ! . id ( ) ] : [ ] ) ) ,
119- } ) ;
120107 }
121108}
122109
0 commit comments