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 input focus outline doesn't include submit button #12

Open
maxdeviant opened this issue May 29, 2023 · 1 comment
Open

Search input focus outline doesn't include submit button #12

maxdeviant opened this issue May 29, 2023 · 1 comment

Comments

@maxdeviant
Copy link
Contributor

Had someone point out to me that the focus outline for the search input is a bit wonky:

image

It would be nice if we could get the focus outline to encompass the submit button and be rounded on both sides.

Prior Art

It looks like crates.io solves this, so we can use them as a reference:

Unfocused

Screenshot 2023-05-29 at 12 21 53 PM

Focused

Screenshot 2023-05-29 at 12 21 56 PM
@hayleigh-dot-dev
Copy link
Member

Just adding some context to this issue.

Screen.Recording.2023-10-21.at.12.15.14.mov

Currently we don't style focus at all (aka this is the native browser focus indicator). Although this looks a bit clunky, it's important that we visually signify the button as a separate focusable and interactive element.

If you look at crates.io they have no focus indicator for the button:

  • Focus the search input
  • Type whatever
  • Press tab, now the button is focused but there is no change to the visual focus styles.

This is actually an accessibility failure!


I agree it would be nice if we styled focus indicators ourselves, but I leave this comment as a note for anyone interested in taking up this issue: it's important the submit button has its own distinct focus indicator too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants