Accessibility and alt Attributes
alt attribute is important for a number of reasons: it describes an image for screen readers used by those without sight or poor sight, it describes the image to bots, and it provides an indicator of what should have loaded if the image fails to load at all. But what about the case where the image doesn't have much value to be read, because it has accompanying positioned text offscreen?
Don't omit the the
alt attribute -- the screen read will read out the image's
src attribute. Gross. Instead include the
alt attribute with an empty value:
<img src="/path/to/image.png" alt="" />
src text is read and you're golden!
One of my favorite social APIs was the Open Graph API adopted by Facebook. Adding just a few META tags to each page allowed links to my article to be styled and presented the way I wanted them to, giving me a bit of control...
I spent a few months experimenting with different approaches for writing simple, elegant and maintainable media queries with Sass. Each solution had something that I really liked, but I couldn't find one that covered everything I needed to do, so I ventured into creating my...
It's usually best to repair broken image paths as soon as possible because they can damage a website's credibility. And even worse is having a user tell you about it. Using jQuery and PHP, you can have your page automatically notify you of broken...
One interesting aspect of web development is geolocation; where is your user viewing your website from? You can base your language locale on that data or show certain products in your store based on the user's location. Let's examine how you can...