Page MenuHomePhabricator

Improve the search UI
Closed, ResolvedPublic

Description

There are a number of ways we could improve the search interface. Improvements can be done as part of this task, or spun out into subtasks.

Layout

The menu is not attached to the input, and its width depends on its content. The menu should appear directly below the input so it seems "attached", and should be the same width as the input at all times. It should also have a max-height and use scrolling after that.

Menu with small width:

Screenshot 2023-12-07 at 1.39.29 PM.png (760×964 px, 93 KB)

Menu that is both too wide and too long:

Screenshot 2023-12-07 at 1.39.38 PM.png (2×1 px, 343 KB)

Mobile styles

The search UI is not very usable on mobile at the moment. It's too wide on small viewports:

image.png (950×778 px, 51 KB)

Accessibility

We should follow the combobox pattern and add ARIA attributes connecting the input with the menu and its items.


Acceptance criteria

  • Menu is attached to the input
  • Menu is the same width as the input
  • Menu has a max-height and adds scroll when needed
  • Search input and menu are usable on mobile
  • ARIA attributes are added to meet accessibility guidelines

Event Timeline

AnneT changed the task status from Open to In Progress.Dec 13 2023, 7:53 PM
AnneT claimed this task.
Jdlrobson triaged this task as Medium priority.Dec 13 2023, 9:00 PM

Change 982908 had a related patch set uploaded (by Anne Tomasevich; author: Anne Tomasevich):

[jsdoc/wmf-theme@master] Refactor and restyle the header and menu; fix search

https://gerrit.wikimedia.org/r/982908

Change 982908 merged by jenkins-bot:

[jsdoc/wmf-theme@master] Refactor and restyle the header and menu; fix search

https://gerrit.wikimedia.org/r/982908

apaskulin updated the task description. (Show Details)
apaskulin subscribed.

Released in 0.0.10