Include alt text in images
Including alt text in images ensures accessibility for screen reader users by providing a text equivalent of the image content, enhancing the overall accessibility of Splunk documentation.
Some Splunk customers use screen reader software, or screen readers, to read our documentation. Screen readers convert the contents on a page into synthesized speech for a user to listen to. All informative images in Splunk docs must have alt text so the entire page is accessible through screen reader software. Alt text is a written-out equivalent of the image that a screen reader can dictate.
You can find more information about website accessibility requirements on the Americans with Disabilities Act (ADA) website and on the Section 508 government website. For more information on accessibility in Splunk docs, see Write accessible documentation.
Alt text requirements
-
For inline images, GIFs, and complex diagrams, include adequate surrounding text so you don't place too much information in the alt text.
-
Ensure that the entire section still makes sense if you replace an image with its alt text.
Best practices for surrounding text
When you're writing surrounding text, keep the following points in mind:
- For an inline image, write the name or description of the icon in the sentence. Put the icon in parentheses immediately after that text.
- For a complex diagram, use lines of surrounding text to explain the diagram. You can include a simple sentence in the alt text that refers to the precise location of this descriptive text.
- Lead into the image with a complete sentence. Punctuate the end of the sentence with a colon.
- It's okay to use "before", "after", and "following" in the surrounding text when you refer to an image. Don't rely on directional language, such as "left", "right", "above", or "below", when you refer to a location in a UI or document. These instructions are unhelpful to users of screen readers.
Best practices for alt text
When you're writing alt text for an image, keep the following points in mind:
- Use short phrases or complete sentences with punctuation.
- Avoid starting alt text with general phrases like "Image of". If you want to specify the type of image, you can describe the image using phrases like "Screenshot of" or "Diagram of".
- Focus on describing the meaning of the image rather than what you see in the image.
- Lead with the most important information.
- Introduce only relevant information based on the context of the topic.
- Don't call out implications or add new information to the alt text.
- Keep the alt text concise overall. If you need to add detailed information to convey the meaning of the image, add this information to the surrounding text.
- For complex images, introduce the image with the surrounding text first. Then, add the most important information about the image in the first sentence of alt text. Add another sentence of alt text that describes where the surrounding text is on that page.