Skip to content

fix(multiple): allow aria tab and accordion panels without content directive - #33966

Open
felipdsa21 wants to merge 3 commits into
angular:mainfrom
felipdsa21:aria-eager-panel-content
Open

felipdsa21 wants to merge 3 commits into
angular:mainfrom
felipdsa21:aria-eager-panel-content

Conversation

@felipdsa21

Copy link
Copy Markdown
Contributor

The ngTabPanel and ngAccordionPanel directives warn in dev mode that they need ngTabContent or ngAccordionContent to render, but content placed directly in a panel already renders. It's created eagerly and stays in the DOM, and the panel gets the inert attribute while hidden.

This removes the warning, making eager rendering a supported alternative to the content directive. A single tab group or accordion can then mix eager panels with lazy ones, which keep or remove their content depending on their own preserveContent.

Rendering eagerly also means the content is included in server-rendered HTML, unlike lazy content.

Fixes #33950

@crisbeto
crisbeto requested a review from ok7sai October 16, 2026 15:44
@felipdsa21
felipdsa21 force-pushed the aria-eager-panel-content branch from f50b2a7 to baebc18 Compare October 16, 2026 16:45
By default, the content of `ngTabContent` and `ngAccordionContent` is created again each
time the panel is shown, not only the first time.
…rective

Content placed directly in `ngTabPanel` or `ngAccordionPanel` is rendered eagerly, but a
dev-mode warning claims the panel needs `ngTabContent` or `ngAccordionContent` to render.
Removes the warning so eager content is supported alongside lazy content.

Fixes angular#33950
@felipdsa21
felipdsa21 force-pushed the aria-eager-panel-content branch from baebc18 to 9535ecf Compare October 18, 2026 18:56
@angular-robot angular-robot Bot added area: docs Related to the documentation area: build & ci Related the build and CI infrastructure of the project labels Oct 18, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: build & ci Related the build and CI infrastructure of the project area: docs Related to the documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(COMPONENT): Angular ARIA tab must allow eager loading of tab content

1 participant