Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes the issues described in #221:
i18n.clear
value (default of "Clear") as the accessible label for the clear buttonTo give the clear button a focus style, avoid making it disabled when the search is focused. Otherwise when you press tab, it doesn't change focus to the clear button. (Rather than disabling it, I made it so that if you somehow click the button while searching, it just does nothing.)ignore, I was wrong about thisVisually the button should look exactly the same when not focused. When it is focused, it will use the user agent default stylesheet (in my case, Ubuntu orange):
I also made some other a11y fixes in the same part of the code:
<label>
to the<input>
because a placeholder is not enough for a11y.<input type="text">
to<input type="search">
, because that's what it is. 🙂 To fix issues with user agent styles adding their own "search" style, I added-webkit-appearance: none;
.