Skip to content

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

Open

Description

@SavvasPolydorou

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

Description

Angular Aria's tabs implementation appears to require tab panel content to be declared using ng-template[ngTabContent], which prevents consumers from eagerly rendering tab panel content in the DOM.

This is problematic for use cases where all tab panels need to be initialized upfront, rather than lazily instantiated when their associated tabs become active. For example, a tab panel may contain a component that needs to initialize early, or preload data that is required for SEO (in SSR setup).

Currently, ngTabContent can only be applied to an ng-template, and the implementation warns when a tab panel does not contain the expected content directive. Applying ngTabContent directly to a component or a regular element does not work because it does not match the directive's selector.

It would be useful to provide a supported way to eagerly instantiate tab panel content while retaining the existing tab panel API and accessibility behavior.

Reasoning

The WAI-ARIA Authoring Practices Guide recommends automatic tab activation on focus when the associated panel can be displayed without noticeable latency. It also notes that this typically requires panel content to be preloaded; otherwise, automatic activation introduces delays that significantly hinder efficient keyboard navigation.

Eager loading is therefore a legitimate use case for accessible tabs, particularly when panel content requires initialization or data fetching before it can be displayed.

Providing an explicit mechanism for eager content instantiation would allow developers to avoid unnecessary delays during tab navigation without having to implement their own tab behavior or work around the current content directive requirements.

Reproduction

Link: https://angular.dev/guide/aria/tabs#example-1

Expected Behavior

I expect the ngTabContent to have a selector on its own without the ng-template infront, so that the tab content can be eagerly loaded

Actual Behavior

The ngTabContent selector has ng-template in front of it which prevents us from eagerly loading tab content that may contain useful information and is needed upfront and without layout shift

Environment

  • Angular: latest
  • CDK/Material: N/A
  • Browser(s): latest
  • Operating System (e.g. Windows, macOS, Ubuntu): N/A

Activity

  1. added
    featureLabel used to distinguish feature request from other issues
    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
    and removed
    needs triageThis issue needs to be triaged by the team
    gemini-triagedLabel noting that an issue has been triaged by gemini
    on Oct 16, 2026
  2. added 4 commits that reference this issue on Oct 16, 2026
    164f442
    f50b2a7
    baebc18
    f08ef66
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: aria/tabsfeatureLabel used to distinguish feature request from other issues

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions