Skip to content

fix(material/chips): refactor non-interactive actions to prevent adding click handlers #31664

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 22, 2025

Conversation

adolgachev
Copy link
Contributor

@adolgachev adolgachev commented Aug 7, 2025

Fixes b/286287327 where non-interaction actions still have a click handler and thus get picked up as interactive by screen readers.

BREAKING CHANGE:

  • MatChipAction no longer has an isInteractive input, it is always interactive and new MatChipContent should be used when not interactive.
  • MatChipTrailingIcon now extends from MatChipContent and can not be made interactive.

@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 Aug 7, 2025
Copy link

github-actions bot commented Aug 7, 2025

Deployed dev-app for 89a7e20 to: https://ng-dev-previews-comp--pr-angular-components-31664-dev-p2n59ez3.web.app

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

Copy link

github-actions bot commented Aug 7, 2025

Deployed docs-preview for 89a7e20 to: https://ng-dev-previews-comp--pr-angular-components-31664-docs-x52jn1y4.web.app

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

@adolgachev adolgachev closed this Aug 7, 2025
@adolgachev adolgachev reopened this Aug 7, 2025
@adolgachev adolgachev changed the title try something fix(material/chips): remove click handler when chip is not interactive Aug 7, 2025
@adolgachev adolgachev added target: minor This PR is targeted for the next minor release action: global presubmit The PR is in need of a google3 global presubmit labels Aug 7, 2025
@adolgachev adolgachev force-pushed the chips-tb branch 3 times, most recently from 61818c7 to bec6583 Compare August 12, 2025 00:47
@adolgachev adolgachev changed the title fix(material/chips): remove click handler when chip is not interactive fix(material/chips): refactor non-interactive actions to prevent adding click handlers Aug 12, 2025
@adolgachev adolgachev force-pushed the chips-tb branch 2 times, most recently from 52608f1 to 93bd21f Compare August 18, 2025 22:59
@adolgachev adolgachev marked this pull request as ready for review August 19, 2025 00:16
@adolgachev adolgachev requested a review from a team as a code owner August 19, 2025 00:16
@adolgachev adolgachev requested review from mmalerba and wagnermaciel and removed request for a team August 19, 2025 00:16
@adolgachev adolgachev added the action: review The PR is still awaiting reviews from at least one requested reviewer label Aug 19, 2025
Copy link
Contributor

@andrewseguin andrewseguin left a comment

Choose a reason for hiding this comment

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

LGTM - this seems like a breaking change since the API is different, so it should be called out in the description of the PR with "BREAKING CHANGES:"

@andrewseguin andrewseguin added target: major This PR is targeted for the next major release and removed target: minor This PR is targeted for the next minor release labels Aug 22, 2025
@adolgachev adolgachev added action: merge The PR is ready for merge by the caretaker target: minor This PR is targeted for the next minor release detected: breaking change PR contains a commit with a breaking change and removed action: review The PR is still awaiting reviews from at least one requested reviewer action: global presubmit The PR is in need of a google3 global presubmit target: major This PR is targeted for the next major release detected: breaking change PR contains a commit with a breaking change labels Aug 22, 2025
@adolgachev adolgachev merged commit 13a9c48 into angular:main Aug 22, 2025
36 of 38 checks passed
@adolgachev adolgachev deleted the chips-tb branch August 22, 2025 20:39
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: material/chips 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: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants