DEV Community

Discussion on: Animated no-element typewriter

Collapse
 
alvaromontoro profile image
Alvaro Montoro • Edited

Ouch! 😅

We could make it more accessible but we'd need to add a role="image" and an aria-label="animated cartoon of a typewriter typing 'Hello!'" to the body... All this would be easier to do if we moved this to a component (replace body with .typewriter in the CSS)... More tips for making CSS art more accessible 😊

Collapse
 
grahamthedev profile image
GrahamTheDev

Can you add role="image" to the <body> element? I would imagine that isn't supported as the <body> element isn't something you can focus with a screen reader?

Thread Thread
 
alvaromontoro profile image
Alvaro Montoro

Good point. I would need to test, but it probably would be better to move it to a different element altogether.

Thread Thread
 
alvaromontoro profile image
Alvaro Montoro

I tested having aria-label and role="img" with Chromevox and VoiceOver. They both announce it as an image and read the aria-label, and VoiceOver also mentions it's empty. It doesn't look ideal anyway. Probably better to move it to an element to make it more accessible.

Collapse
 
alvaromontoro profile image
Alvaro Montoro

I'll be talking about this topic on the Hamburg HTML Meetup on Tuesday at 7PM CET:

Zoom meeting coming soon 🙂