Button: Icon-only visual issues
See original GitHub issueWhat package(s) are you using?
-
carbon-components
-
carbon-components-react
Detailed description
Describe in detail the issue you’re having.
- Icon only buttons when using the ghost variant have incorrect padding so icon isn’t centered
- double focus outline inherited from the icon tooltip component
Is this issue related to a specific component?
Button
What did you expect to happen? What happened instead? What would you like to see changed?
- ghost icon-only buttons have the icon centered
- Focus only has 1 border
What browser are you working in?
Chrome
What version of the Carbon Design System are you using?
v10.4.1
What offering/product do you work on? Any pressing ship or release dates we should be aware of?
Watson Health Design Pattern & Asset Library
Steps to reproduce the issue
-
hover over ghost icon-only button to see the background color
-
focus on any icon-only button
Please create a reduced test case in CodeSandbox
https://codepen.io/elizabethsjudd/pen/JgpWeP
Additional information
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Accessible Icon Buttons - Sara Soueidan
Technique #1: Accessible Visually Hidden Text ... If your button isn't supposed to visually contain any text, you can still provide the text ......
Read more >What I wish was in WCAG: prohibit icon-only buttons
WCAG requires we provide a visible label buttons on our buttons, but this can be with a 'text alternative' like an image or...
Read more >How to Prevent Users from Mistapping Icons - UX Movement
This is a common problem when icon buttons are aligned in a row. Users can easily hit adjacent buttons if there isn't enough...
Read more >Icon buttons | NBUX - The visual design language of N Brown
Icon only buttons are used when the button is in component context and when there is no room for labelling. Although our icons...
Read more >Buttons with icons - Leonardo Fernandes
If you care about good design, you might have already realized the problem with these buttons. The icons have no negative space: they...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The icon-only button started as a Sketch hack so we didn’t always have to re-create it in the Sketch file. However, the icon only ghost button is now being updated in code to match the Sketch icon button and we will be moving icon button in the Sketch file under the button component.
Available in
v10.10
closing because PR is merged. Related issue: https://github.com/carbon-design-system/carbon/issues/5312 PR: https://github.com/carbon-design-system/carbon/pull/5313At the moment there wasn’t any need for other variants. If you’d like to add ghost icon buttons, could you provide full page product screens / ghost icon buttons in context so we can understand the usage? Icon buttons are newly added and still waiting to be stress-tested. This is a good opportunity to write some usage documentation if you have any suggestions.
That said, we do have icon buttons in the toolbar, so perhaps by “ghost icon buttons”, you could also use the toolbar which offers a more subtle hover state.