-
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
Bug - Inputs: inconsistencies across browsers for search types #5210
Comments
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. |
To tl;dr some of the discussion happening in the linked PR:
Two possible routes to go, rather than removing the browser icons like the linked PR does, could be 1) not use |
Discussed on Slack - but am in favor of removing the browser X and enforcing the PF X everywhere so that we don't run the risk of having to Xs at any point |
@nicolethoen @mattnolting @srambach Based on Margot's input above, would we want to update/revert our Search Input component so that it's a simple Nicole, in react that would involve going through examples/demos and removing any |
sounds like that's what we'd need to do! |
Yep, I agree. Considering the built in functionality of search input and limited benefit of |
We are opting for the react approach of removing type=search from inputs on the react side. |
We're using
|
|
Describe the problem
When using an
<input type="search" />
(such as is being done in some React PRs, see patternfly/patternfly-react#8040 and patternfly/patternfly-react#8293, the latter reverted the type for now though), the input gets rendered differently.In Chromium/Safari, an "x" icon will render inside the input, which can be clicked to clear it. In Firefox, however, no such icon gets rendered.
Rather than just using
type="text"
for search inputs, we should usetype="search"
since it'd be more semantically correct, and depending on the assistive tech it would get announced as a search text input.A followup to this would also involve using the correct
type
for inputs/allowing the correct types to be used. Some notes:type
prop to the SearchInput component, which it may be better to only allowtype="search"
since we have other input components to pass atype
into.type="text"
is hardcoded in a native input when thehint
prop is passedpf-c-search-input
classes, while React uses the TextinputGroupMain under the hoodThe following list shows currently where an input is being used, what
type
is being used, and whether a native input or one of our component's is being used. Most of this pertains to React implementation, but should be relatively 1:1 with Core (Core also has several checkbox inputs in Table demos)Input uses cases in PatternFly
type
prop)type
could be omitted)type
prop)type
prop)type
prop)type
prop)type
prop)type
prop, the other examples do not; Core only uses "text" in examples)type
prop of "text")type
prop of "text")type
prop of "text")type
prop of "text", but can be overridden; Core only uses "text" in examples)type
incorrectly)Screenshots
If applicable, add screenshots to help explain the issue.
Chrome (similar in Safari):
Firefox:
The text was updated successfully, but these errors were encountered: