alphagov / govuk-frontend

GOV.UK Frontend contains the code you need to start building a user interface for government platforms and services.
https://frontend.design-system.service.gov.uk/
MIT License
1.18k stars 325 forks source link

The non-visual experience of Exit this Page button doesn't make it clear it's a safety feature #3688

Closed CharlotteDowns closed 1 year ago

CharlotteDowns commented 1 year ago

This issue is from May 2023 external accessibility audit report.

Usability issue

Issue ID: DAC_Usability_Exit_Button_01

URLs: https://govuk-frontend-pr-3503.herokuapp.com/full-page-examples/child-maintenance

Screen shots

Exit this page red button

The ‘Exit this page’ button did not inform users of screen reading assistive technologies of its emergency purpose with the label. Although this may already be conveyed on a previous page, it does not mean that the user will always remember this information.

Current code ref(s)

#main-content > div.govuk-exit-this-page > a

Screen reader comments

“I was able to clearly navigate to and select the ‘Exit this page’ button. The button appeared at the beginning of the main content section making it easy to locate and use.

However, although I was aware from the label of the button that I would exit the page it was not immediately clear to me that the item was an emergency exit and that my information would be removed from the page. Placing the phrase ‘Emergency’ within the label for example ‘Emergency exit from this page’ with additional hint information advising me that the page will be removed from browsing history would ensure that all screen reader users are aware of the value of this feature.”

Solution

Consider adding the term ‘Emergency’ to the button. This can be visually hidden to provide that extra information for users of screen reading assistive technologies, while keeping the current aesthetics.

querkmachine commented 1 year ago

This would need a minor change to the EtP button to allow for HTML content to be used for the inner text. Currently only plain text is allowed, but we would need to allow teams to provide their own visually-hidden text for localisation purposes.

This could be snuck into the 4.7.0 release quickly, but it's not an absolute requirement and we can add it later.