Skip to content

fix(material/chips): allow for role to be overwritten on chip list and chip #15794

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
Mar 2, 2022

Conversation

crisbeto
Copy link
Member

Allows for the ARIA role of the mat-chip-list and mat-chip to be overwritten.

Fixes #15787.

@crisbeto crisbeto added the target: patch This PR is targeted for the next patch release label Apr 11, 2019
@crisbeto crisbeto requested a review from jelbourn as a code owner April 11, 2019 16:52
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Apr 11, 2019
@@ -165,7 +165,18 @@ export class MatChipList extends _MatChipListMixinBase implements MatFormFieldCo
}

/** The ARIA role applied to the chip list. */
get role(): string | null { return this.empty ? null : 'listbox'; }
@Input()
get role(): string | null {
Copy link
Member Author

Choose a reason for hiding this comment

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

Note: I'm not a fan of this property signature (having | null), but I kept it for backwards compatibility. Since the property was readonly until now we could get away with changing it to just be a string.

Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

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

LGTM

@jelbourn jelbourn added pr: lgtm action: merge The PR is ready for merge by the caretaker labels Apr 12, 2019
@mmalerba mmalerba added aaa and removed aaa labels Apr 25, 2019
@crisbeto crisbeto force-pushed the 15787/chips-role branch from 75927e5 to c7c3925 Compare May 17, 2019 14:20
@andrewseguin andrewseguin added the P4 A relatively minor issue that is not relevant to core functions label May 30, 2019
@crisbeto crisbeto force-pushed the 15787/chips-role branch from 4e052bd to 1504b3d Compare May 17, 2020 12:07
@mmalerba mmalerba removed the lgtm label Jul 31, 2020
@andrewseguin andrewseguin added needs rebase and removed cla: yes PR author has agreed to Google's Contributor License Agreement labels Dec 29, 2021
@crisbeto crisbeto changed the title fix(chips): allow for role to be overwritten on chip list and chip fix(material/chips): allow for role to be overwritten on chip list and chip Mar 2, 2022
…d chip

Allows for the ARIA `role` of the `mat-chip-list` and `mat-chip` to be overwritten.

Fixes angular#15787.
@crisbeto crisbeto requested review from a team, mmalerba and andrewseguin as code owners March 2, 2022 08:41
@crisbeto crisbeto 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 Mar 2, 2022
@crisbeto crisbeto merged commit f05e65a into angular:master Mar 2, 2022
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Apr 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker P4 A relatively minor issue that is not relevant to core functions target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow custom roles for chip groups and chips
5 participants