Skip to content

docs: stop the disabled aria toolbar radio group from changing selection - #70685

Merged
atscott merged 1 commit into
angular:mainfrom
erkamyaman:fix-aria-toolbar-disabled-radio-click
Sep 11, 2026
Merged

atscott merged 1 commit into
angular:mainfrom
erkamyaman:fix-aria-toolbar-disabled-radio-click

Conversation

@erkamyaman

@erkamyaman erkamyaman commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

On next.angular.dev/guide/aria/toolbar#disabled-widgets the alignment buttons
are disabled, but clicking one still selects it. #70516 added a click handler to
each radio when it moved selection into the app, and soft-disabled widgets stay
clickable, so nothing stops it. This drops the three handlers from the disabled
group, like the disabled redo button next to it.

https://next.angular.dev/guide/aria/toolbar#disabled-widgets

Before:
(clicking "align right" selects it even though the group is disabled):

Screenshot 2026-09-11 at 12 55 46

After:
(focus moves, selection stays on "align left"):

Screenshot 2026-09-11 at 12 55 34

The disabled toolbar example marks its alignment radio group `disabled`.
Toolbars are soft-disabled by default, so the widgets only receive
`aria-disabled` and stay clickable, which the guide describes as focusable
but unavailable.

Since angular#70516 moved selection into the app, each radio also carries a
`(click)="alignment.set(...)"` handler that never checks the disabled state.
Clicking a disabled radio therefore changes the selection. Before that change
the radios had no app listener and the library ignored clicks on disabled
items.

Drop the three click handlers from the permanently disabled group in the
basic, material and retro variants, the same way the disabled redo button in
the same template already has none.
@pullapprove
pullapprove Bot requested a review from crisbeto September 11, 2026 09:58
@angular-robot angular-robot Bot added the area: docs Related to the documentation label Sep 11, 2026
@ngbot ngbot Bot added this to the Backlog milestone Sep 11, 2026
@JeanMeche
JeanMeche requested review from ok7sai and removed request for crisbeto September 11, 2026 10:13
@pullapprove
pullapprove Bot requested a review from crisbeto September 11, 2026 10:14

@ok7sai ok7sai left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

@JeanMeche JeanMeche added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release labels Sep 11, 2026
@atscott atscott added target: minor This PR is targeted for the next minor release and removed target: patch This PR is targeted for the next patch release labels Sep 11, 2026
@atscott
atscott merged commit fc2f6fd into angular:main Sep 11, 2026
28 of 30 checks passed
@atscott

atscott commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

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

@erkamyaman
erkamyaman deleted the fix-aria-toolbar-disabled-radio-click branch September 11, 2026 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: docs Related to the documentation target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants