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

bugfix: fix a11y warning in Ratings component #1739

Conversation

Gerschtli
Copy link
Contributor

@Gerschtli Gerschtli commented Jul 9, 2023

Description

Before this fix, the following warning occurred:

A11y: <svelte:element> with click handler must have an ARIA role

This was an issue because the on:click binding was always applied, even when the element would be not interactive (a span).

Checklist

Please read and apply all contribution requirements.

  • This PR targets the dev branch (NEVER master)
  • Documentation reflects all relevant changes
  • Branch is prefixed with: docs/, feat/, chore/, bugfix/
  • Ensure Svelte and Typescript linting is current - run pnpm check
  • Ensure Prettier linting is current - run pnpm format
  • All test cases are passing - run pnpm test
  • Includes a changeset (if relevant; see above)

Sorry, something went wrong.

@changeset-bot
Copy link

changeset-bot bot commented Jul 9, 2023

🦋 Changeset detected

Latest commit: f5b63c9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@skeletonlabs/skeleton Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Jul 9, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
skeleton-docs ✅ Ready (Inspect) Visit Preview Jul 9, 2023 3:47pm

Verified

This commit was signed with the committer’s verified signature. The key has expired.
andir Andreas Rammhold
Before this fix, the following warning occurred:

    A11y: <svelte:element> with click handler must have an ARIA role

This was an issue because the `on:click` binding was always applied,
even when the element would be not interactive (a `span`).
@Gerschtli Gerschtli force-pushed the bugfix/fix-a11y-warning-in-ratings-component branch from 97266a6 to f5b63c9 Compare July 9, 2023 15:46
@endigo9740
Copy link
Contributor

endigo9740 commented Jul 9, 2023

@Gerschtli we have an open ticket regarding this:
#1708

We announced this during the last release that we will be investigating each of these to determine how we wish to handle these (bottom of the page):
#1716

But we typically like to keep these kind of sweeping changes uniform - so I'll consider your PR, but cannot promise we'll move forward with it if we decide to go another way. This is especially critical when it affects a11y. There are certain rules and considerations that need to be adhered when touching anything related to accessibility to ensure we get this right.

Thanks for your patience in the meantime.

Also make sure you read our contribution guidelines - we typically ask for folks to volunteer rather than surprise us with PRs. We've ran into several instances of duplicate effort in the past, and we're doing our best to try and avoid that:
https://www.skeleton.dev/docs/contributing

@Gerschtli
Copy link
Contributor Author

I searched for issues like that, must have slipped through.. No worries, I just saw the warning and it wasn't that complicated to fix. Take your time and feel free to close my PR, if you want to go another route :)

Thank you for building and maintaining this awesome project!

Copy link
Member

@AdrianGonz97 AdrianGonz97 left a comment

Choose a reason for hiding this comment

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

@Gerschtli Thanks for the PR! These changes are excellent and are exactly what I had planned to do anyway 😄.

@endigo9740
Copy link
Contributor

It's not as DRY, but I think given the simplicity of the component this will suffice for now. Merging now and this will be a part of next week's release. Thanks for your contribution!

@endigo9740 endigo9740 merged commit a8e0546 into skeletonlabs:dev Jul 14, 2023
@Gerschtli Gerschtli deleted the bugfix/fix-a11y-warning-in-ratings-component branch July 14, 2023 20:06
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.

None yet

3 participants