-
-
Notifications
You must be signed in to change notification settings - Fork 359
feat: add title and aria-label attributes to btn-icon components #3619
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
feat: add title and aria-label attributes to btn-icon components #3619
Conversation
- Add accessibility props with default values to components identified in issue - Update examples and playgrounds with accessibility attributes Fixes skeletonlabs#3596
🦋 Changeset detectedLatest commit: a34c536 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
I initially missed wiring the accessibility props (btnDismissTitle and btnDismissAriaLabel) into the Toast components for both Svelte and React, so I committed those fixes just now. Does the API reference in the Toast docs need to explicitly include these props? It seems the API tables might be generated during a build script, so I left those files untouched in case they pulled from the JSDocs comments. Can update if needed. From what I can tell, Toast/Toaster are the only fully “public” components in this set. The rest being examples and website use. I did expose props on components used in the website like HomeCompGrid, Controls, and Lightswitch. Those are not part of the public API but, still being components, I updated them the same way for consistency. I was torn whether to create a separate types file for the website’s Lightswitch component ( Also, not sure where you are on testing for a11y, but if you prefer, I can add prop tests (btnDismissTitle, btnDismissAriaLabel) to the component test. Let me know and I’ll include them. |
@JamesN-dev per above
Correct, API Reference tables are auto-generated based on the
That sounds great, both were part of the reqs in the original ticket.
I'll provide some direct feedback in this in my code review shortly.
I don't think this is needed. This is a temporary solution until the new component APIs are introduced in Skeleton v4. At which point users will have full control over these values in a more direct fashion. |
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.
@JamesN-dev overall great job, just a few comments. This likely won't take long, it's just the same few changes repeated in a few places. I've tried to add context for the requests as I go, but feel free to ask questions if something is unclear.
sites/themes.skeleton.dev/src/lib/components/common/Lightswitch/Lightswitch.svelte
Outdated
Show resolved
Hide resolved
sites/themes.skeleton.dev/src/lib/components/common/Lightswitch/types.ts
Outdated
Show resolved
Hide resolved
sites/themes.skeleton.dev/src/lib/components/generator/Controls/Controls.svelte
Outdated
Show resolved
Hide resolved
sites/themes.skeleton.dev/src/lib/components/generator/Controls/types.ts
Outdated
Show resolved
Hide resolved
@JamesN-dev I'd love to have an ETA for when the requested changes might be completed. If you don't feel like you can complete these, please let us know. |
@endigo9740 Apologies for the delayed response. I'm trying to find the time to square these up. I should be able to get to it sometime by the end of the week. Will try to make it sooner than later! |
@endigo9740 Sorry for the delay. All feedback and requested changes have been addressed. |
and group Toast props
76708d6
to
6b9e311
Compare
Linked Issue
Closes #3596
Description
Adds
title
andariaLabel
props to all btn-icon components in codebase.Provides semantic default values and updates examples with a11y attributes.
Checklist
Please read and apply all contribution requirements.
docs/
,feature/
,chore/
,bugfix/
main
branchpnpm check
in the root of the monorepopnpm format
in the root of the monorepopnpm lint
in the root of the monorepopnpm test
in the root of the monorepo/package
projects, please supply a ChangesetChangesets
View our documentation to learn more about Changesets. To create a Changeset:
pnpm changeset
and follow the prompts