Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Add hidden "Error:" prefix to error messages #1221
We've standardised on using a simpler, more 'instructional' language for our messages, but this means that most error messages are less explicit about the fact that the field is in an error state.
I think we are therefore relying slightly more on the visual presentation of the error message to help the user understand that they have 'done something wrong'.
Thinking specifically about the way that a screen-reader user would encounter an error message:
I don't think it's entirely clear that "Enter a National Insurance number in the right format" is an error.
This attempts to counter that by adding a visually hidden "Error:" prefix to the error message:
(As discussed in alphagov/govuk-design-system-backlog#47 (comment))
Feb 25, 2019
This seems like a really nice improvement to make it super explicit that there's an error.
Does it need to be done at the same time as a new feature? Would you ever want to remove this?
In theory we could add this feature without extending the API if we were confident.
If not, this seems like a good way to do it
I think based on the work with the error summary and the conclusions reached in https://accessibility.blog.gov.uk/2017/12/18/what-working-on-gov-uk-navigation-taught-us-about-accessibility/ we can be pretty confident this will work as intended.
Would you agree?
While I'd normally err on the side of testing again I think that we should go ahead with this based on the recent work on improving the visually hidden text helper, error summary work and GOV.UK Publishing's navigation work.
This will also be included in the upcoming audit.