-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Doc update: Add "Icon only" buttons to the Button examples #1667
Comments
cc @IBM/carbon-designers for a spec or mockup on how "icon only" buttons should appear as well as some copy describing the use case for this button variant |
@carmacleod and @emyarod We know there's a need for this and have some sketches around specs and potential usage (see below) but the current Carbon v10 effort was to reskin current Carbon functionality... so we haven't added a lot of the variations that we'd like, and that we know we need for a more robust system. Here's a sketch of some of our thinking around icon only buttons. Also, the security team has an icon- only button in their react storybook too if that helps. Also 2, check out the Carbon Data Table experimental component for some insitu examples of icon-only button functionality (especially the kit, which is set to release in a couple weeks). Otherwise... Coming Soon! (I hope this helps) |
Take a look at how WH approaches Icon-only buttons for accessibility: #1714 (comment) This approach allows clarity for sighted users as well. The |
Agree that a custom tooltip that appears on mouse hover or keyboard focus is an accessibility requirement for icon-only buttons. The WH approach is a good example. |
* feat(Modal): align markup with vanilla experimental Modal * test(Modal): update enzyme selectors * test(Modal): update snapshot * feat(Modal): add new icons for experimental component * fix(Modal): directly import new icon * chore: bump bundle size threshold * feat(Modal): pass className and attributes to experimental icon * feat(ComposedModal): add support for experimental icon
If a button contains an icon and does not have any visible text, then the icon needs to have role="img" and a proper aria-label.
For example:
Would be great to add an example of an icon-only button to all of the Button examples, i.e. Primary Button, Secondary Button, Tertiary Button, Ghost Button, Danger button, Primary Danger button, Small Primary button, Small secondary button, Small tertiary button, Small ghost button, Small primary danger button, Small danger button.
The text was updated successfully, but these errors were encountered: