Skip to content

refactor(aria/tabs): clean up tab selection and linking to panels#32859

Merged
adolgachev merged 1 commit intoangular:mainfrom
adolgachev:aria-tabs
Apr 24, 2026
Merged

refactor(aria/tabs): clean up tab selection and linking to panels#32859
adolgachev merged 1 commit intoangular:mainfrom
adolgachev:aria-tabs

Conversation

@adolgachev
Copy link
Copy Markdown
Contributor

@adolgachev adolgachev commented Feb 26, 2026

Refactors Tabs pattern to simplify how tabs are associated with their tab panels, as well as other dependent code.

This is a revision of the previous approach which swapped to use contentChildren and template references only

This just includes clean up and re-factoring to move the value matching of Tab and TabPanel to the directive and remove extra synching of selection and linked state in favor of a more direct approach.

@adolgachev adolgachev changed the title Aria tabs refactor(aria/tabs): Rework to use template reference to link tabs and panels Feb 26, 2026
@adolgachev adolgachev added Accessibility This issue is related to accessibility (a11y) dev-app preview When applied, previews of the dev-app are deployed to Firebase docs: preview When applied, a preview of the documentation site is deployed to Firebase labels Feb 26, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 26, 2026

Deployed dev-app for c5161de to: https://ng-dev-previews-comp--pr-angular-components-32859-dev-pxtvzh2b.web.app

Note: As new commits are pushed to this pull request, this link is updated after the preview is rebuilt.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 26, 2026

Deployed docs-preview for 33fb4f4 to: https://ng-dev-previews-comp--pr-angular-components-32859-docs-58cy5tjn.web.app

Note: As new commits are pushed to this pull request, this link is updated after the preview is rebuilt.

@adolgachev adolgachev force-pushed the aria-tabs branch 6 times, most recently from 9f18364 to cb3c051 Compare March 7, 2026 01:49
@adolgachev adolgachev changed the title refactor(aria/tabs): Rework to use template reference to link tabs and panels refactor(aria/tabs): simplify code by using template references instead of user id to link tabs and panels Mar 7, 2026
@adolgachev adolgachev force-pushed the aria-tabs branch 7 times, most recently from f6c32a1 to d913ebb Compare March 11, 2026 05:29
@adolgachev adolgachev marked this pull request as ready for review March 11, 2026 05:36
@adolgachev adolgachev requested a review from ok7sai March 11, 2026 05:36
@pullapprove pullapprove Bot requested review from andrewseguin and tjshiu March 11, 2026 05:36
@adolgachev adolgachev added action: review The PR is still awaiting reviews from at least one requested reviewer and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Mar 11, 2026
@adolgachev adolgachev marked this pull request as draft March 12, 2026 00:24
@adolgachev adolgachev added the target: patch This PR is targeted for the next patch release label Mar 12, 2026
@adolgachev adolgachev marked this pull request as ready for review March 12, 2026 19:55
@adolgachev adolgachev force-pushed the aria-tabs branch 2 times, most recently from c687368 to b914539 Compare April 15, 2026 23:08
@ok7sai
Copy link
Copy Markdown
Member

ok7sai commented Apr 15, 2026

We should put this change on hold for two main reasons

  • Static Id assignment is discouraged internally.
  • Unlike Accordion that a trigger-panel pair are strongly coupled in the document, tabs and panels are two separated groups so the template reference passing can easily fail due to the scoping issue. A common use case we've seen is the tablist gets wrapped into a standalone component.

value input might no be the cleanest implementation, but I also don't see a big drawback of it.

@adolgachev adolgachev force-pushed the aria-tabs branch 2 times, most recently from 374f2c5 to 2de91db Compare April 21, 2026 05:51
@adolgachev adolgachev added target: major This PR is targeted for the next major release and removed target: patch This PR is targeted for the next patch release labels Apr 21, 2026
@adolgachev adolgachev changed the title refactor(aria/tabs): clean up tab selection and linking to panels, add direct template ref refactor(aria/tabs): clean up tab selection and linking to panels Apr 21, 2026
@pullapprove pullapprove Bot requested a review from wagnermaciel April 21, 2026 07:29
@adolgachev adolgachev removed the request for review from wagnermaciel April 21, 2026 07:30
@pullapprove pullapprove Bot requested a review from wagnermaciel April 21, 2026 07:30
Comment thread src/aria/tabs/tab-list.ts Outdated
Comment thread src/aria/tabs/tabs.spec.ts Outdated
Comment thread src/aria/tabs/tabs.ts Outdated
Comment thread src/aria/tabs/tab-list.ts Outdated
@adolgachev adolgachev force-pushed the aria-tabs branch 4 times, most recently from 91dce82 to d0613b3 Compare April 21, 2026 08:40
@adolgachev adolgachev requested a review from ok7sai April 23, 2026 04:22
@adolgachev adolgachev removed the request for review from wagnermaciel April 24, 2026 16:26
@adolgachev adolgachev added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer action: presubmit The PR is in need of a google3 presubmit labels Apr 24, 2026
@adolgachev adolgachev merged commit efdfef9 into angular:main Apr 24, 2026
26 of 28 checks passed
@adolgachev
Copy link
Copy Markdown
Contributor Author

This PR was merged into the repository. The changes were merged into the following branches:

@adolgachev adolgachev deleted the aria-tabs branch April 24, 2026 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Accessibility This issue is related to accessibility (a11y) action: merge The PR is ready for merge by the caretaker area: aria/tabs dev-app preview When applied, previews of the dev-app are deployed to Firebase docs: preview When applied, a preview of the documentation site is deployed to Firebase target: major This PR is targeted for the next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants