Applied Accessibility -1 Add a Text Alternative to Images
Web Pages Applied Accessibility
Accessibility" generally means having web content and a user interface that can be understood, navigated, and interacted with by a broad audience
- have well-organized code that uses appropriate markup
- ensure text alternatives exist for non-text and visual content
- create an easily-navigated page that's keyboard-friendly
Having accessible web content is an ongoing challenge. A great resource for your projects going forward is the W3 Consortium's Web Content Accessibility Guidelines (WCAG). They set the international standard for accessibility and provide a number of criteria you can use to check your work.
1- Add a Text Alternative to Images is now considered mandatory
Alt text describes the content of the
image and provides a text-alternative. This helps in case the image
fails to load or can't be seen by a user. It's also used by search
engines to understand what an image contains to include it in search
results. Here's an example:
<img src="importantLogo.jpeg" alt="Company logo">
readers can access the
alt attribute and read its contents to deliver key information.
Good
alt text is short but descriptive, and meant to briefly convey the meaning of the image. You should always include an alt attribute on your image. Per HTML5 specification, this is now considered mandatory.
sometimes images are grouped with a caption already describing them, or are used for decoration only. In these cases alt text may seem redundant or unnecessary.
In situations when an image is already explained with text content, or does not add meaning to a page, the
img still needs an alt attribute, but it can be set to an empty string. Here's an example:<img src="visualDecoration.jpeg" alt="">
Background
images usually fall under the 'decorative' label as well. However, they
are typically applied with CSS rules, and therefore not part of the
markup screen readers process.
Note
For images with a caption, you may still want to include
source
alt text, since it helps search engines catalog the content of the image.source
Comments
Post a Comment