immich-app / immich

High performance self-hosted photo and video management solution.
https://immich.app
GNU Affero General Public License v3.0
33.07k stars 1.59k forks source link

feat(web,a11y): form and search filter accessibility #9087

Closed ben-basten closed 2 weeks ago

ben-basten commented 2 weeks ago

Description

Move checkboxes / radio buttons into components

Created components to reduce duplicated code, build in accessibility by default, and provide a consistent user experience anywhere that checkboxes are used.

All usages of <input type="checkbox" /> were updated to use this new component.

Add labels to the context/file name search filters

The radio button labeling wasn't working with the screen reader. There are options to make this work using aria-labelledby, but I preferred adding labels to both the radio button and input fields for clarity. I'm open to thoughts or opinions on this!

Other accessibility changes

Screenshots

Expand for screenshots

**Desktop: labels for context/file name search** ![desktop](https://github.com/ben-basten/immich/assets/45583362/1c55c80a-daf0-459a-af32-bf19611ddc53) **Mobile: labels for context/file name search** ![mobile-text](https://github.com/ben-basten/immich/assets/45583362/9ab809d7-3873-4b88-a5a2-0b731fd02652) **Focused checkbox** ![mobile-focus](https://github.com/ben-basten/immich/assets/45583362/1a3c7408-9f40-4ee7-a76e-e028db9bf0b3)

How Has This Been Tested?

Navigate through the search filters and affected checkbox modals to verify they work as expected.

Checkboxes changed:

Checklist: