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

feat(Button): add icon-only button support #3368

Conversation

emyarod
Copy link
Member

@emyarod emyarod commented Jul 11, 2019

Closes #2490

This PR adds support for icon-only buttons in the React library

Refs #2287, #2366, #3115

Changelog

New

  • Icon only button support and docs for React library

Changed

  • update vanilla icon-only button example

Removed

  • unused CSS class in vanilla docs (button, overflow menu, icon tooltip)

Testing / Reviewing

Ensure that icon-only buttons appear and function as expected

@netlify
Copy link

netlify bot commented Jul 11, 2019

Deploy preview for carbon-components-react ready!

Built with commit 7c4e7d2

https://deploy-preview-3368--carbon-components-react.netlify.com

@netlify
Copy link

netlify bot commented Jul 11, 2019

Deploy preview for the-carbon-components ready!

Built with commit 7c4e7d2

https://deploy-preview-3368--the-carbon-components.netlify.com

@netlify
Copy link

netlify bot commented Jul 11, 2019

Deploy preview for carbon-elements ready!

Built with commit 7c4e7d2

https://deploy-preview-3368--carbon-elements.netlify.com

Copy link
Contributor

@elizabethsjudd elizabethsjudd left a comment

Choose a reason for hiding this comment

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

Thanks for taking this work over fo the React demos!!

Button
</button>
</div>
aria-label="danger" {{/if}} type="button">
Copy link
Contributor

Choose a reason for hiding this comment

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

FYI, if you add an aria-label to a button the SR doesn't actually read the contents of them button so the user would never hear Button. I had a chat with @snidersd about this and she said that for danger there really isn't a way to denote this variant generically to the user but we be following best practices for content design and making sure the label of the button is clear to the user.

Copy link
Member Author

Choose a reason for hiding this comment

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

thanks for the info, this was just carried over from our existing button examples. should we open a new PR to remove that aria-label in all of the examples?

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree that it's beyond the scope of this PR and should be moved to a separate issue.

Copy link
Contributor

@asudoh asudoh left a comment

Choose a reason for hiding this comment

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

LGTM 👍 - Thanks @emyarod for doing this!

Copy link
Collaborator

@tw15egan tw15egan left a comment

Choose a reason for hiding this comment

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

Nice work 👍

@tw15egan tw15egan requested a review from a team July 11, 2019 21:11
@ghost ghost requested review from aagonzales and removed request for a team July 11, 2019 21:11
Copy link
Member

@aagonzales aagonzales left a comment

Choose a reason for hiding this comment

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

Looks good! 🎉

@tw15egan tw15egan merged commit 048bd14 into carbon-design-system:master Jul 11, 2019
@emyarod emyarod deleted the 2490-expose-icon-only-button-react-docs branch July 12, 2019 14:00
@emyarod emyarod mentioned this pull request Jul 15, 2019
41 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose icon-only button in Carbon React documentation
5 participants