Skip to content
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

Merged
merged 10 commits into from
Jan 12, 2024

Conversation

felix-ico
Copy link
Collaborator

@felix-ico felix-ico commented Nov 2, 2023

this should fix #2190

and i removed the optional ariacheckedstate, i guess it can be derived by the selected prop

Copy link

netlify bot commented Nov 2, 2023

Deploy Preview for marvelous-moxie-a6e2fe ready!

Name Link
🔨 Latest commit 0f2daeb
🔍 Latest deploy log https://app.netlify.com/sites/marvelous-moxie-a6e2fe/deploys/65857ed4866feb0008bccdeb
😎 Deploy Preview https://deploy-preview-2192--marvelous-moxie-a6e2fe.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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;
Copy link
Collaborator

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? 😕

Copy link
Collaborator Author

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...

@felix-ico felix-ico merged commit e63dbc1 into main Jan 12, 2024
12 checks passed
@felix-ico felix-ico deleted the fix/a11y-chip-role branch January 12, 2024 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ScaleChip: [role]s do not have all required [aria-*] attributes
2 participants