Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS Modular CSS with Sass Getting Modular with Mixins and Functions Background Image Mixin

Michal Janek
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Michal Janek
Front End Web Development Techdegree Graduate 30,654 Points

Is using 'srt' class a modern practice instead of alt attribute?

I think I have come accross this in a different course but wanted to know for sure. If it is for screen readers we no longer need alt attribute right? Which practice is better then?

1 Answer

Adam Pengh
Adam Pengh
29,881 Points

Hi Michal Janek,

Alt text is required for images in order to be accessible to screen readers. Using an "srt" type class is used to make an element/text accessible to screen readers but not display on the screen. Hopefully that clears things up for you.