-
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
feat: add title to clear button Search #11474
feat: add title to clear button Search #11474
Conversation
✅ Deploy Preview for carbon-components-react ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for carbon-elements ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
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.
Thanks so much for doing this! Left a quick question, curious what you think 👀
@@ -135,6 +135,7 @@ const Search = React.forwardRef(function Search( | |||
className={clearClasses} | |||
disabled={disabled} | |||
onClick={clearInput} | |||
title="Clear" |
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.
One idea for this field could be to use closeButtonLabelText
which is currently being used to label the <button>
.
title="Clear" | |
title={closeButtonLabelText} |
One thing we would want to make sure is that title
is configurable (for example, someone could specify an alternate title) given that people could use this component in different situations or would like to localize this text 👍
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.
Hi @joshblack I have updated the title to title={closeButtonLabelText} and the test cases. Thanks for your recommendation.
Adding title to clear button in Search Component. The clear button now has the same type of of title that was created in the NumberInput component.
Changed
Testing / Reviewing