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: add title to clear button Search #11474

4 changes: 4 additions & 0 deletions packages/react/src/components/Search/next/Search-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ describe('Search', () => {
expect(type1).toEqual('button');
expect(type2).toEqual('button');
});

it('should have clear title', () => {
expect(btns.prop('title')).toBe('Clear search input');
});
});

describe('icons', () => {
Expand Down
1 change: 1 addition & 0 deletions packages/react/src/components/Search/next/Search.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ const Search = React.forwardRef(function Search(
className={clearClasses}
disabled={disabled}
onClick={clearInput}
title={closeButtonLabelText}
type="button">
<Close />
</button>
Expand Down