Description
Describe the bug
After entering text in the search inputs on https://designsystem.digital.gov/components/search/, a clear button is shown. I have a few questions around this:
-
This uses a non-standard browser default clear button that is not supported in Firefox, so Firefox visitors will get no clear button.
-
It also does not have a hover state.
-
It is not accessible via the keyboard. I'm not sure if this is an issue or not. Is the expectation with a screenreader that the escape key could be used to clear the input, and it is therefore not necessary that the clear button be accessible?
Steps to reproduce the bug
- Go to https://designsystem.digital.gov/components/search/ in Chrome.
- Enter some text in the search input and see there is a clear button that appears.
- Go to the same page in Firefox.
- Enter some text in the search input and see there is no clear button.
Expected Behavior
Clear button is consistent across major browsers.
Related code
No response
Screenshots
System setup
No response
Additional context
This branch shows how a cross-browser (x) clear button could be created via the use of a reset button accompanying the search input. However, this may not be an optimal solution https://github.com/cfpb/consumerfinance.gov/compare/ans_global_search_fix?expand=1
Code of Conduct
- I agree to follow this project's Code of Conduct.
- I checked the current issues for duplicate bug reports.
Metadata
Type
Projects
Status
Needs refinement

