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 box is not keyboard friendly #5650

Open
3 of 9 tasks
OnkarRuikar opened this issue Mar 17, 2022 · 1 comment · May be fixed by #11233
Open
3 of 9 tasks

Search box is not keyboard friendly #5650

OnkarRuikar opened this issue Mar 17, 2022 · 1 comment · May be fixed by #11233
Labels
♿ a11y An MDN Web Docs accessible by everyone 🐛 bug Something isn't working, or isn't working as expected has PR Issues that already have a PR idle p4 Not urgent, only if time allows 🔎 search Search feature ux make the user experience awesome

Comments

@OnkarRuikar
Copy link
Contributor

Summary

The Search box is not easy to use using only keyboard and without mouse.

Consider a scenario where a user is on MDN home page and trying to search Request interface using "request" word.

  1. After, typing search text and hitting Enter key, the first suggestion is forced on to the user. Have to hit down arrow key 5 times to get to the option which performs full search. In case of GitHub and Google searches, they give priority to the user entered text.

  2. On home page, some search suggestions go out of the viewport. Even after hitting down arrow key they don't come into view.

outofviewport

Without scrolling down(i.e. involving mouse) we can't see the last full-search option. This makes above point 1) more painful.

  1. Suggestions do not get cycled on pressing Tab key like they do on google search.

  2. On blur, by clicking outside, suggestions are not hidden.

  3. Suggestions are sorted by "popularity". While actual search results are sorted by "best". User may get confused by seeing different outcomes.
    On home page:

bypopularity


Results page:

bybest

  1. On home page there are two search boxes. One in top right corner and a giant one in the center of the page.

URL

https://developer.mozilla.org/en-US/

Reproduction steps

Issue 1:

  1. Open MDN home page in Chrome.
  2. Type "request" in the search box that is at the center.
  3. Hit Enter key. It opens page for '400 Bad Request' and not search results page.

Issue 2:

  1. Set browser zoom to 0.
  2. On MDN home page type "request" in center search box.
  3. Six suggestions are listed below the search box.
  4. If your monitor resolution is not high(mine is 1366x768) some suggestions will go off the viewport.
  5. Without using mouse, to scroll down, try to select option "Site search for request".
  6. There is no way to know which option we are on.

Issue 3:

  1. On MDN home page in center search box type "request".
  2. Try to cycle through suggestions using Tab key, like we can do on google search.

Issue 4:

  1. Type "request" in search box.
  2. Click outside the search box. The suggestions are not hidden.

Issue 5:

  1. On home page search for text "request".
  2. And choose "Site search" suggestion.
  3. Notice the difference between suggestions and results sort order.

Expected behavior

  • 1. Should be able to type search text and hit Enter/Return key in order to see full search results.
  • 2. When the input box gets focused by tab or click, one of the following needs to happen:
    - make it touch top border of the viewport. We can use scrollIntoView() for this.
    - Or make highlighted option text appear in the input box like Google.com does.
  • 3. By pressing tab cycle through suggestions till user hits enter or escape keys. This will bring options into view automatically. And will solve the issue 2).
  • 4. On blur, by clicking outside the suggestion box, hide it.
  • 5. Unless this has been done intentionally, make search results sort by "popularity" by default.
  • 6. Get rid of or hide top right search box on the home page.

Actual behavior

As mentioned in summary section.

Device

Desktop

Browser

Chrome

Browser version

Stable

Operating system

Windows

Screenshot

No response

Anything else?

No response

Validations

@OnkarRuikar OnkarRuikar added the 🐛 bug Something isn't working, or isn't working as expected label Mar 17, 2022
@github-actions github-actions bot added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Mar 17, 2022
@schalkneethling schalkneethling added ♿ a11y An MDN Web Docs accessible by everyone and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Mar 17, 2022
@schalkneethling schalkneethling self-assigned this Mar 17, 2022
@caugner caugner added the 🔎 search Search feature label Mar 17, 2022
@schalkneethling schalkneethling removed their assignment Apr 25, 2022
@caugner
Copy link
Contributor

caugner commented Nov 15, 2022

Here's what we should do:

  1. Resolve Search should suggest exact matches first #7047, which would cause the Request page to show up first.
  2. Make sure we scroll if a focused search item is not in the viewport.

PS: Maybe Downshift v7 fixes 2).

@caugner caugner added p4 Not urgent, only if time allows ux make the user experience awesome accepting PR We invite you to open a PR to resolve this issue. labels Nov 15, 2022
@github-actions github-actions bot added the idle label Dec 21, 2022
@pseudopilot pseudopilot linked a pull request Jun 2, 2024 that will close this issue
@caugner caugner added has PR Issues that already have a PR and removed accepting PR We invite you to open a PR to resolve this issue. labels Jun 5, 2024
@github-actions github-actions bot removed the idle label Jun 6, 2024
@github-actions github-actions bot added the idle label Jul 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
♿ a11y An MDN Web Docs accessible by everyone 🐛 bug Something isn't working, or isn't working as expected has PR Issues that already have a PR idle p4 Not urgent, only if time allows 🔎 search Search feature ux make the user experience awesome
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

3 participants