3 ms·
Actually afaik, there are accessibility issues with that solution. Instead, stick with img and use object-fit instead. https://css-tricks.com/almanac/propertie
by chiefalchemist 5y ago
Actually afaik, there are accessibility issues with that solution. Instead, stick with img and use object-fit instead.
https://css-tricks.com/almanac/properties/o/object-fit/ https://css-tricks.com/almanac/properties/o/object-fit/
I'd also suggest reading this. Having to write ultra-complicated media queries (width + resolution, etc.) feels friction-y. Instead, use sizes and scrset and the browser will take care of the rest.
https://ericportis.com/posts/2014/srcset-sizes/ https://ericportis.com/posts/2014/srcset-sizes/
- bruce343434 5y agoWhat accessibility issues? that a _blind_ person might not _see_ that it's an image? Who really cares? And don't just go "oh bruce you're a bad guy you don't care about aria for blind people" but actually think about it. Images on the web are of 0 value to blind people. If it's really important to your article, add a subscript to the image. (which a screenreader will gladly read)