Tests for accessible error messages episode artwork

EPISODE · Jul 26, 2022 · 3 MIN

Tests for accessible error messages

from The Call Kent Podcast · host Kent C. Dodds

Hi Kent!My name is Jan. I'd like to ask you: How do you write tests for accessible error messages with testing library?By accessible error messages, I mean, suppose you have a form with an input. You have a p tag which renders the error, if there is an error. And that p tag has an id.And now you pass this p tags id to the input as a value for the aria-describedby property.So far, I'm using byText to check for the existence of that error in my tests, but I was wondering whether there is a better query for that?Thank you!Custom Queries Tests for accessible error messages

Episode metadata supplied by the publisher feed · Published Jul 26, 2022

Embed this episode

NOW PLAYING

Tests for accessible error messages

0:00 3:39

No transcript for this episode yet

We transcribe on demand. Request one and we'll notify you when it's ready — usually under 10 minutes.

No similar episodes found.

No similar podcasts found.

Frequently Asked Questions

How long is this episode of The Call Kent Podcast?

This episode is 3 minutes long.

When was this The Call Kent Podcast episode published?

This episode was published on July 26, 2022.

Can I download this The Call Kent Podcast episode?

Yes. Use the download control on the episode player to save the publisher-provided media file.
URL copied to clipboard!