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 {
9393 '[attr.aria-expanded]' : 'pattern.expanded()' ,
9494 '[attr.aria-controls]' : 'pattern.controls()' ,
9595 '[attr.aria-disabled]' : 'pattern.disabled()' ,
96+ '[attr.inert]' : 'hardDisabled() ? true : null' ,
97+ '[attr.disabled]' : 'hardDisabled() ? true : null' ,
9698 '[attr.tabindex]' : 'pattern.tabindex()' ,
9799 '(keydown)' : 'pattern.onKeydown($event)' ,
98100 '(pointerdown)' : 'pattern.onPointerdown($event)' ,
@@ -115,6 +117,13 @@ export class CdkAccordionTrigger {
115117 /** Whether the trigger is disabled. */
116118 disabled = input ( false , { transform : booleanAttribute } ) ;
117119
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+
118127 /** The accordion panel pattern controlled by this trigger. This is set by CdkAccordionGroup. */
119128 readonly accordionPanel : WritableSignal < AccordionPanelPattern | undefined > = signal ( undefined ) ;
120129
You can’t perform that action at this time.
0 commit comments