-
Notifications
You must be signed in to change notification settings - Fork 86
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
fix: remove unnecessary prop, add required aria attribute #2192
Conversation
✅ Deploy Preview for marvelous-moxie-a6e2fe ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@@ -35,8 +35,8 @@ export class Chip { | |||
@Prop() selected?: boolean = false; | |||
/** (optional) chip aria-role */ | |||
@Prop() ariaRoleTitle?: string; |
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.
Instead of the ternary below when defining the role
, why not add a default value to the prop? would that work?
@Prop() ariaRoleTitle?: 'switch' | 'radio' | ... = 'switch';
and I would use these as possible types, according to mdn:
- checkbox
- menuitemcheckbox
- menuitemradio
- option
- radio
- switch
btw it's a shame this is called ariaRoleTitle
instead of innerAriaRole
, no? 😕
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.
Instead of the ternary below when defining the role, why not add a default value to the prop? would that work?
this is fixed
btw it's a shame this is called ariaRoleTitle instead of innerAriaRole, no? 😕
yes but i guess changing this would be a breaking change if people are using the old prop name...
this should fix #2190
and i removed the optional ariacheckedstate, i guess it can be derived by the selected prop