-
Notifications
You must be signed in to change notification settings - Fork 94
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(SearchInput/TextInputGroup): remove browser clear icons #5211
Conversation
Preview: https://patternfly-pr-5211.surge.sh A11y report: https://patternfly-pr-5211-a11y.surge.sh |
This looks great. I opened an issue to replace our use of the search input with the text input group. #5212 On this, we show examples of search inputs without without our clear button (a use case may be when there is not enough space to show it) - in those cases, would we still want to remove the browser generated clear button? Even if it's inconsistent, I know some people use particular browsers for their UI with form elements like this. Related, what about the form control ( |
@thatblindgeye I agree, #2 seems like a good option. An issue is a simple |
Re: a class, I think it could go a couple of ways.
Then we could maybe add a class to the |
If I read it correctly, then this is removing the browser clear (which appears in safari/chrome but not in FF) in favor of manually adding a clear button? In this particular case, I'd favor consistency within a browser over consistency across browsers. Altering default browser behavior can be risky with no guarantee of future behavior. |
In testing w/VO, I'm not seeing a huge benefit to updating |
@srambach That's a really good point! Maybe instead of tinkering with any of this, we can just recommend having our clear button rendered when necessary via examples and/or documentation?
@mattnolting Yeah with VO the only difference I think is "search text field" being announced when type="search" vs "edit text" (NVDA and JAWS for me I didn't notice any difference). aria-labels could help differentiate, and the React examples do use "Search input" as the default aria-label. Based on JAWS and NVDA, at least for me, not signifying the type of input like VO does, I think the only pros I can think of using type="search" is 1) it's slightly more accurate (though in 2/3 of screen readers that accuracy doesn't seem to do much), and 2) it may replace the typical "Enter" symbol on touch keyboards with a magnifying glass. There have already been some updates in React that update instances of Search Input to use |
This issue has been automatically marked as stale because it has not had activity in the last 60 days. It will be closed in 30 days if no further activity occurs. |
Closing per discussion in the linked issue. |
closes #5210
I added the rules to both files because Core uses
pf-c-search-input
classes for the Search Input, but React uses Text Input Group under the hood (not sure if there's an issue open about making this more consistent, I didn't come across one).This How to Remove “X” icon from search input field or input type search article is what I came across.
To test (use Chromium or Safari):
input
hastype="search"