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

Search & Filter hidden Search button breaks vertical alignment within search box when focused #5289

Closed
pastelcyborg opened this issue Aug 8, 2024 · 6 comments · Fixed by #5339
Labels
Bug 🐛 P3 Triaged Issue has been reviewed as part of legacy backlog grooming (project P3). Triaged: v4 Triaged, to be implemented as part of Vanilla v4

Comments

@pastelcyborg
Copy link
Contributor

pastelcyborg commented Aug 8, 2024

Describe the bug

The Search & Filter search box contains a hidden Search button that becomes visible when the user tabs over to it from the chips/input itself. When this button becomes visible, it breaks vertical alignment within the search box, effectively pushing all the search box contents down a significant amount.

To Reproduce

Steps to reproduce the behavior:

  1. Go to a Search & Filter demo
  2. Tab through the chips/input using the keyboard
  3. Focus on the hidden Search button
  4. Witness incorrect vertical alignment within the search box

Expected behavior

Optimally, the vertical size and alignment within the search box should not change when the hidden Search button is visible/focused.

Screenshots

image

Copy link

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/WD-14048.

This message was autogenerated

@advl
Copy link
Contributor

advl commented Aug 20, 2024

Taking a look at it, it seems the easy fix would be to use tabindex="-1" on the button. As I believe the fix is accessibility-oriented, I would recommend not to use css to account for separation of concerns with the markup.

Here are two questions prior to a PR :

  1. Can we expect implementations to include the proper button markup ? In that case, we would rather fix the demos and React implementations.
  2. In case we would be looking at a css fix : what would be the accessibility consequences of using display:none on the button instead of the current off-screen utility ? Would the form markup still be valid and accessible ?

@pastelcyborg
Copy link
Contributor Author

I don't believe manipulating the tabindex or display properties of the button are the solutions here. The button is currently correctly accessible/visible on the proper interactions - it's visually hidden until tabbed over, at which point it becomes visible and focused. The real issue is that the button's metrics are simply too large for its container - I think reducing its height, padding, and/or margin would be more appropriate fixes.

@jmuzina
Copy link
Member

jmuzina commented Sep 10, 2024

The problem is that the form element containing the search input and the hidden search button takes up too much height when the hidden search input is focused. I attempted to solve this by restricting the height of these elements to 100% in PR #5339 .

@bartaz bartaz added the P3 Needs decision Needs team agreement in terms of triaging. label Sep 25, 2024
@bartaz
Copy link
Member

bartaz commented Sep 25, 2024

Triage: this may be high effort fix. This component is used only in React component context, so we should check how it behaves there (not just in static Vanilla docs).

@bartaz
Copy link
Member

bartaz commented Sep 27, 2024

@pastelcyborg: possibly it can be a quick fix (just to make it not break it). Let's timebox them.

Triage: let's try to find a quick fix (max half-day worth of work). If not, leave it for new architecture.

@bartaz bartaz added P3 Triaged Issue has been reviewed as part of legacy backlog grooming (project P3). Triaged: v4 Triaged, to be implemented as part of Vanilla v4 and removed P3 Needs decision Needs team agreement in terms of triaging. labels Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐛 P3 Triaged Issue has been reviewed as part of legacy backlog grooming (project P3). Triaged: v4 Triaged, to be implemented as part of Vanilla v4
Projects
None yet
4 participants