Autocomplete results not keyboard navigable

Created on 5 May 2025, 12 days ago

Problem/Motivation

The autocomplete results are not keyboard accessible.

Steps to reproduce

  1. Type some text into the search box until autocomplete results appear.
  2. Press the down arrow key.
  3. Notice focus does not move to the search results.

Proposed resolution

  1. Since Tab correctly moves to the next element in sequence from the search input, the clear button, I propose using the established arrow key pattern to navigate the autocomplete results.
  2. When focus is on the search input, add some JavaScript that moves the focus to the search results when pressing the down arrow key.
  3. Each search autocomplete result is navigable via the up and down arrow keys.
  4. When pressing the up arrow key on the first autocomplete item, move the focus back to the search input.
πŸ› Bug report
Status

Active

Version

1.0

Component

General code

Created by

πŸ‡ΊπŸ‡ΈUnited States bronzehedwick New York

Live updates comments and jobs are added and updated live.
  • Accessibility

    It affects the ability of people with disabilities or special needs (such as blindness or color-blindness) to use Drupal.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024