Fix: add ARIA combobox pattern to Nominatim autocomplete

What this MR does

Implements the full ARIA 1.2 combobox pattern on the Nominatim autocomplete, which was completely missing. Without this fix, screen reader users receive no indication that suggestions exist and cannot interact with them.

Changes

js/provider/nominatim-provider.js

  • role="combobox", aria-autocomplete="list", aria-expanded, aria-haspopup="listbox", aria-controls, aria-activedescendant on the search input
  • role="listbox", aria-label, aria-busy, stable id on the suggestions dropdown
  • role="option", aria-selected, id on each suggestion item
  • aria-expanded kept in sync in all cases: show, hide, 0 results
  • scrollIntoView on the active option during keyboard navigation
  • aria-busy="true/false" during the Nominatim API fetch
  • Home/End key support to jump to first/last suggestion
  • Visually-hidden aria-live="polite" region announcing result count and "No results found" via Drupal.t / Drupal.formatPlural

templates/entity-proximity-select.html.twig

  • Visually-hidden linked to the search input via for/id
  • aria-hidden="true" focusable="false" on all decorative SVG icons

WCAG

Fixes SC 1.3.1 (Info and Relationships) and 4.1.2 (Name, Role, Value).

Testing

  • DevTools: verify ARIA attributes appear on the search input and suggestions
  • VoiceOver + Safari: type 2+ characters, hear result count announced, navigate with arrow keys, hear active option, select with Enter
  • NVDA + Firefox: same

Notes

The Google Places provider uses the native Google Autocomplete widget which handles ARIA internally — no changes needed there.

Issue: https://www.drupal.org/project/eps/issues/3593634

Merge request reports

Loading