kiesraad / abacus

Abacus, software voor verkiezingsuitslagen en zetelverdeling
https://kiesraad-abacus.pages.dev
European Union Public License 1.2
17 stars 6 forks source link

Focus first input when navigating to next step #503

Closed jorisleker closed 17 hours ago

jorisleker commented 2 weeks ago

Right now, we focus the header of section. Usertesting has shown this is confusing / leads people to use the mouse instead of the keyboard to navigate between inputs.

in scope: all steps in the data-entry form. out of scope: modals, warning/errors (and rest of the application)

oliver3 commented 2 weeks ago

It seems that the consensus on the internet is that for a SPA with routing, you need to change the title and announce the change. Announcing can be done either by moving focus to the new content or header (as we do now), or use an ARIA live region if you cannot do that, e.g. when you want the first input to have the focus (as we would like to).

Also summarized on https://hidde.blog/accessible-page-titles-in-a-single-page-app/

Note that role status also turns something into a live region

Possible implementations: