Closed jorisleker closed 17 hours 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:
PageTitle
componentPageTitle
component, similar to https://github.com/Heydon/on-demand-live-region or https://github.com/adobe/react-spectrum/blob/main/packages/@react-aria/live-announcer/src/LiveAnnouncer.tsx
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.
aria-live="polite"
attribute to the h2 that contains the name of the political group, so screen readers announce the element's content.tabindex="-1"
from the h2 elementin scope: all steps in the data-entry form. out of scope: modals, warning/errors (and rest of the application)