-
Notifications
You must be signed in to change notification settings - Fork 6.8k
feat(material-experimental/mdc-chips): Allow custom role for chip set #20829
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
Conversation
The default mat-chip-set role is 'presentation' if chips are present, and null if there are no chips. Some users want to specify custom roles, in particular 'list' (they would use 'listitem' for the chips, which have no default role). Currently this isn't possible, because mat-chip-set overwrites their custom role with 'presentation'. Add an Input to allow a custom role.
223a886
to
a17666d
Compare
What's the reason this shouldn't be hardcoded as list/listitem? |
I considered that, and I don't think it's a bad idea! This PR doesn't preclude us from changing the default role in the future, and even if we decide to do so, I still think it would be nice to provide a way to override it. There are a few internal examples of people using mat-chip-set in a non-list/listitem way, and the original design intended for this component to be pretty generic/non-prescriptive. |
I don't think the failing ci/circleci: tests_saucelabs tests are related to this change. It looks like they're timing out. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…20829) The default mat-chip-set role is 'presentation' if chips are present, and null if there are no chips. Some users want to specify custom roles, in particular 'list' (they would use 'listitem' for the chips, which have no default role). Currently this isn't possible, because mat-chip-set overwrites their custom role with 'presentation'. Add an Input to allow a custom role. (cherry picked from commit 335fc0c)
…20829) The default mat-chip-set role is 'presentation' if chips are present, and null if there are no chips. Some users want to specify custom roles, in particular 'list' (they would use 'listitem' for the chips, which have no default role). Currently this isn't possible, because mat-chip-set overwrites their custom role with 'presentation'. Add an Input to allow a custom role. (cherry picked from commit 335fc0c)
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
The default mat-chip-set role is 'presentation' if chips are
present, and null if there are no chips. Some users want to
specify custom roles, in particular 'list' (they would use
'listitem' for the chips, which have no default role).
Currently this isn't possible, because mat-chip-set overwrites
their custom role with 'presentation'. Add an Input to allow a
custom role.