Alternative text
Provide an inclusive and accessible experience to all your users.
Use alternative (alt) text to provide an inclusive and accessible experience to all your users. Screen reading software uses alt text to explain what images represent to users with low, or loss of vision. If images fail to download, alt text is also displayed.
When writing alt text, write concisely and avoid ambiguous terms. Use active voice and simple words with concise sentences.
Alt text for images
Use alt
tags for all images.
Example |
---|
<img alt="Image that describes a person interacting with Revel." /> |
Icons and actions
Use the aria-label
attribute to apply a description to icons and actions.
Example |
---|
<button aria-label="Close" onclick="myDialog.close()">X</button> |
HTML language tag
Use the HTML lang
attribute to ensure that speech synthesis and translation tools understand how to pronounce and translate your content.
Example |
---|
To specify that the language of the page is English, use: <html lang="en"></html> . |