File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
src/cdk-experimental/accordion Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -93,6 +93,8 @@ export class CdkAccordionPanel {
93
93
'[attr.aria-expanded]' : 'pattern.expanded()' ,
94
94
'[attr.aria-controls]' : 'pattern.controls()' ,
95
95
'[attr.aria-disabled]' : 'pattern.disabled()' ,
96
+ '[attr.inert]' : 'hardDisabled() ? true : null' ,
97
+ '[attr.disabled]' : 'hardDisabled() ? true : null' ,
96
98
'[attr.tabindex]' : 'pattern.tabindex()' ,
97
99
'(keydown)' : 'pattern.onKeydown($event)' ,
98
100
'(pointerdown)' : 'pattern.onPointerdown($event)' ,
@@ -115,6 +117,13 @@ export class CdkAccordionTrigger {
115
117
/** Whether the trigger is disabled. */
116
118
disabled = input ( false , { transform : booleanAttribute } ) ;
117
119
120
+ /**
121
+ * Whether this trigger is completely inaccessible.
122
+ *
123
+ * TODO(ok7sai): Consider move this to UI patterns.
124
+ */
125
+ readonly hardDisabled = computed ( ( ) => this . pattern . disabled ( ) && this . pattern . tabindex ( ) < 0 ) ;
126
+
118
127
/** The accordion panel pattern controlled by this trigger. This is set by CdkAccordionGroup. */
119
128
readonly accordionPanel : WritableSignal < AccordionPanelPattern | undefined > = signal ( undefined ) ;
120
129
You can’t perform that action at this time.
0 commit comments