From 59557d5c7c2396a8c667b563c268dba6e0ea267d Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Fri, 18 Sep 2026 16:11:13 +0200 Subject: [PATCH] fix(aria/accordion): ensure right attribute is set when used as a host directive Some functionality in the `AccordionGroupPattern` relies on the `ngAccordionTrigger` attribute being present. These changes add it as an explicit host binding in case the directive is used as a host directive. --- src/aria/accordion/accordion-trigger.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/aria/accordion/accordion-trigger.ts b/src/aria/accordion/accordion-trigger.ts index 109b5f8b8c64..404962f36993 100644 --- a/src/aria/accordion/accordion-trigger.ts +++ b/src/aria/accordion/accordion-trigger.ts @@ -52,6 +52,11 @@ import {AccordionPanel} from './accordion-panel'; '[attr.aria-disabled]': '_pattern.disabled()', '[attr.disabled]': '_pattern.hardDisabled() ? true : null', '[attr.tabindex]': '_pattern.tabIndex()', + + // `AccordionGroupPattern` depends on this to find the closest + // trigger so ensure that it is set. It's usually there for normal usage, + // but it might not be when the trigger is a host directive. + 'ngAccordionTrigger': '', }, }) export class AccordionTrigger implements OnInit, OnDestroy {