Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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,880 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.