img-001 must GuidesAPI docs Always provide alt text for images and non-text elements. Use descriptive alt text that conveys the element’s purpose; use empty alt text for purely decorative images.
This page covers requirements for all images in documentation: alt text, text alternatives, how to introduce and caption figures, and how to refer to them. Screenshot-specific and diagram-specific guidance lives on their own pages.
img-001 must GuidesAPI docs Always provide alt text for images and non-text elements. Use descriptive alt text that conveys the element’s purpose; use empty alt text for purely decorative images.
Examples
 for a diagram that carries meaning for a purely decorative dividerRationale
Alt text is how a screen-reader user gets an image’s meaning; decorative images take empty alt so they are skipped.
img-002 should GuidesAPI docs Alt text should be concise (155 characters or fewer). When an image requires more explanation than fits in alt text, provide a longer description in the surrounding body text.
Examples
Rationale
Alt text is read aloud in full, so it stays short, with any longer explanation in the surrounding text.
img-008 should GuidesAPI docs Alt text should not begin with phrases like ‘Image of’ or ‘Photo of’, should include punctuation, and should use full sentences or noun phrases.
Examples
Rationale
“Image of” wastes the first words a screen reader announces, so describing the content directly is more useful.
img-003 must GuidesAPI docs Do not use images of text, code samples, or terminal output; use actual text instead.
Examples
npm install example-sdkRationale
Text baked into an image cannot be selected, searched, translated, or read by assistive tech.
img-007 should GuidesAPI docs Avoid embedding explanatory text in images. When text must appear in a figure, keep it brief, use sentence case, and ensure the same information is available in accessible text form, such as a figure description.
Examples
Rationale
Text embedded in a figure is not translated or read by assistive tech, so the same information belongs in accessible text.
img-004 should GuidesAPI docs Avoid image maps; when they must be used, provide text link alternatives and ensure keyboard (Tab key) navigability.
Examples
Rationale
Image maps are hard to use by keyboard and screen reader, so text alternatives keep them reachable.
img-005 should GuidesAPI docs Introduce images with a complete sentence (ending in a colon if the image immediately follows, or a period if other content intervenes).
Examples
Rationale
An introducing sentence gives the image context and a screen-reader pause before it.
img-006 must GuidesAPI docs Figure captions, when used, should be complete sentences, or sentence fragments with end punctuation. If figure numbers are used, follow the form ‘Figure NUMBER. DESCRIPTION.’ Do not capitalize ‘figure’ in cross-references except at the start of a sentence.
Examples
img-009 must GuidesAPI docs Do not use spatial references such as ‘the image above’ when referring to figures; use figure numbers or restate the figure.
Examples
Rationale
“The image above” breaks when layout reflows or content is read linearly; a figure number is stable.