-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
fix( radio-tile, selectable-tile): deprecates iconDescription and adds handleOnChange function #4966
Conversation
Deploy preview for the-carbon-components ready! Built with commit c91f70b https://deploy-preview-4966--the-carbon-components.netlify.com |
Deploy preview for carbon-components-react failed. Built with commit 0ba84bc https://app.netlify.com/sites/carbon-components-react/deploys/5e15073c115fd000071a0998 |
Deploy preview for carbon-elements failed. Built with commit 0ba84bc https://app.netlify.com/sites/carbon-elements/deploys/5e15073cd24e0d0008e8128f |
Deploy preview for carbon-components-react failed. Built with commit c91f70b https://app.netlify.com/sites/carbon-components-react/deploys/5e163cad6f210d0009ce68f8 |
Deploy preview for carbon-elements failed. Built with commit c91f70b https://app.netlify.com/sites/carbon-elements/deploys/5e163cadb3e5f1000a459ef1 |
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.
LGTM basically, just one thing - Thanks @abbeyhrt!
@@ -297,10 +306,12 @@ export class SelectableTile extends Component { | |||
value, | |||
name, | |||
title, | |||
// eslint-disable-next-line no-unused-vars |
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.
Instead of ignoring no-unused-vars
here, we can safely remove iconDescription
here?
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.
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.
Though this has been merged already - You are right. I don't see it's a problem, though, given it's a React warning that doesn't prevent user applications from working, and they can simply remove iconDescription
to get rid of the warning.
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.
🎉
…andleOnChange function (carbon-design-system#4966) * fix(radio-tile,tile): refactor radio tile to fn and add onChange to tile * chore(tile): removes default prop for deprecated icon description Co-authored-by: Josh Black <[email protected]>
…andleOnChange function (carbon-design-system#4966) * fix(radio-tile,tile): refactor radio tile to fn and add onChange to tile * chore(tile): removes default prop for deprecated icon description Co-authored-by: Josh Black <[email protected]>
Closes #3474
This was done during mob programming with @aledavila and @joshblack.
This PR adds a
handleOnChange
to the SelectableTile so that the tiles are selectable with Jaws and VO. It changes the name of the "Selectable Tile" story to "Radio" since the example usesRadioTile
and causes confusion with the MultiSelect story that does use theSelectableTile
. It also deprecatesiconDescription
forSelectableTile
andRadioTile
and removes its implementation. TheCheckmarkFilled
icon is purely for decoration and removing the iconDescription allows it to be ignored by screenreaders. This PR also convertsRadioTile
to a functional component instead of a class.Changelog
New
handleOnChange
function forSelectableTile
Changed
RadioTile
to functionRemoved
iconDescription
deprecated for RadioTile and SelectableTileTesting / Reviewing
Verify that with VO and Jaws that you can check and uncheck all of the selectable tiles and generally check to make sure everything is still working as expected.