From c6d24085176b9da263ed0d3ad659267cc802ce8d Mon Sep 17 00:00:00 2001 From: Ben Basten <45583362+ben-basten@users.noreply.github.com> Date: Tue, 19 Mar 2024 12:56:41 +0000 Subject: [PATCH] feat(web): combobox accessibility improvements (#8007) * bump skip link z index, to prevent overlap with the search box * combobox refactor initial commit * pull label into the combobox component * feat(web): combobox accessibility improvements * fix: replace crypto.randomUUID, fix border UI bug, simpler focus handling (#2) * fix: handle changes in the selected option * fix: better escape key handling in search bar * fix: remove broken tailwind classes Co-authored-by: Michel Heusschen <59014050+michelheusschen@users.noreply.github.com> * fix: remove custom "outclick" handler logic * fix: use focusout instead of custom key handlers to detect focus change * fix: move escape key handling to the window Also add escape key handling to the input box, to make sure that the "recent searches" dropdown gets closed too. * fix: better input event handling Co-authored-by: Michel Heusschen <59014050+michelheusschen@users.noreply.github.com> * fix: highlighting selected dropdown element --------- Co-authored-by: Michel Heusschen <59014050+michelheusschen@users.noreply.github.com> --- .../elements/buttons/skip-link.svelte | 2 +- .../shared-components/change-date.svelte | 9 +- .../shared-components/combobox.svelte | 219 +++++++++++++----- .../search-bar/search-bar.svelte | 18 +- .../search-bar/search-camera-section.svelte | 16 +- .../search-bar/search-location-section.svelte | 24 +- .../settings/setting-combobox.svelte | 4 + .../user-settings-page/app-settings.svelte | 1 + 8 files changed, 214 insertions(+), 79 deletions(-) diff --git a/web/src/lib/components/elements/buttons/skip-link.svelte b/web/src/lib/components/elements/buttons/skip-link.svelte index 457661d65f..8a304469d7 100644 --- a/web/src/lib/components/elements/buttons/skip-link.svelte +++ b/web/src/lib/components/elements/buttons/skip-link.svelte @@ -14,7 +14,7 @@ }; -