Skip to content

Add keyboard shortcuts for search

Sarah German requested to merge gps-keyboard-nav into main

What does this MR do and why?

Adds keyboard shortcuts for search:

  • Shortcut key to focus on the search box
  • Navigate the results with up/down arrows

Closes #1562 (closed)

Screenshots, screen recordings, or links to review app

Review app: https://gps-keyboard-nav.docs.gitlab-review.app/

Before After
image image
image image

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Configure a local GitLab Docs environment: https://gitlab.com/gitlab-org/gitlab-docs/-/blob/main/doc/setup.md.
  2. Compile with Google search flags:
make clean && GOOGLE_SEARCH_KEY="AIzaSyAUCkVNs7JsHYKISjVrVv1PGXg9WQr1MCQ" SEARCH_BACKEND="google" bundle exec nanoc compile
  1. Start the local web server: bundle exec nanoc view
  2. Run some searches and try navigating with your keyboard (focus on the search box, scroll through results).

Merge request acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Sarah German

Merge request reports