Skip to content

Conversation

edwardhorsford
Copy link
Contributor

@edwardhorsford edwardhorsford commented Sep 24, 2024

Description

Fixes #1029.

I'm unsure if this should be considered a breaking change or not - might be worth a discussion.

Visually there should be no difference.

Before After
Video with span Video with paragraph

Checklist

@anandamaryon1 anandamaryon1 added 🐛 bug Something isn't working the way it should (including incorrect wording in documentation) accessibility Accessibility related labels Oct 7, 2024
@anandamaryon1
Copy link
Contributor

anandamaryon1 commented Apr 22, 2025

Had a quick test of this and I don't find any difference in how VoiceOver or NVDA read the error message.

VoiceOver reads error separately and NVDA reads the whole line as one, regardless of span or p.

Error_VO.2.mov
Error_NVDA.2.mov

@edwardhorsford
Copy link
Contributor Author

@anandamaryon1 your first example shows a visual <p> in the heading - is that a bug or something you added to tell them apart? If the later, how do they compare to GOV.UK's error messages?

@frankieroberto
Copy link
Contributor

@edwardhorsford @anandamaryon1 testing by GDS back in 2021 didn't seem to suggest there was any difference in screen reader treatment either? alphagov/govuk-frontend#2083 (comment)

@anandamaryon1
Copy link
Contributor

@anandamaryon1 your first example shows a visual <p> in the heading - is that a bug or something you added to tell them apart? If the later, how do they compare to GOV.UK's error messages?

Ah yes, that was just so that I could tell them apart.

I can have a look at GOV.UK's, I didn't check theirs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility Accessibility related 🐛 bug Something isn't working the way it should (including incorrect wording in documentation)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error message should use paragraphs rather than spans
3 participants