|
| 1 | +# Writing Alt Text (for Wagtail Editors) |
| 2 | + |
| 3 | +The "alt text" (alternative text) on an image describes images for people who can't see them. Usually this means people who are having the webpage read aloud to them by a device or app. |
| 4 | + |
| 5 | +## When to Use Alt Text |
| 6 | + |
| 7 | +If the image is removed and no context is missing, then the image is decorative and doesn't need alt text. You can leave the field in Wagtail blank. |
| 8 | + |
| 9 | +## Writing Effective Alt Text |
| 10 | + |
| 11 | +- Be concise |
| 12 | +- Be specific |
| 13 | +- When there are people in it: |
| 14 | + - If you know their names, use their names |
| 15 | + - Do not mention gender, age, or race |
| 16 | + - Describe the action or mood conveyed |
| 17 | + |
| 18 | +### Be Concise |
| 19 | + |
| 20 | +Aim for under 125 characters when possible. Screen readers announce "image" or "graphic" before reading alt text, so don't start with "image of" or "picture of." |
| 21 | + |
| 22 | +✅ `Red panda sleeping on a tree branch`<br> |
| 23 | +❌ `Photo of a red panda sleeping`<br> |
| 24 | +❌ `A cute red panda sleeping peacefully on a tree branch in the forest` |
| 25 | + |
| 26 | +### Be Specific |
| 27 | + |
| 28 | +Describe what's actually in the image, focusing on details relevant to the surrounding content. |
| 29 | + |
| 30 | +✅ `Mozilla VPN dashboard showing connection status`<br> |
| 31 | +❌ `VPN screenshot` |
| 32 | + |
| 33 | +### When there are people in it |
| 34 | + |
| 35 | +- If you know their names, use their names |
| 36 | +- Do not mention gender, age, or race |
| 37 | +- Describe the action or mood conveyed |
| 38 | + |
| 39 | +✅ `Person with a laptop bag and Mozilla lanyard.`<br> |
| 40 | +✅ `Contributor at a Mozilla hack-a-thon.`<br> |
| 41 | +❌ `Asian woman with her hair in a pony tail.` |
| 42 | + |
| 43 | +## Examples |
| 44 | + |
| 45 | +{ width="400" } |
| 46 | + |
| 47 | +✅ `A tab group of recipes.`<br> |
| 48 | +✅ `Tab groups appear next to your open tabs.`<br> |
| 49 | +❌ `Screenshot of Firefox` |
| 50 | + |
| 51 | +{ width="400" } |
| 52 | + |
| 53 | +✅ `Mark Surman, Mozilla President.`<br> |
| 54 | +❌ `Bald white man in a black jacket and red scarf.` |
| 55 | + |
| 56 | +{ width="400" } |
| 57 | + |
| 58 | +✅ `People sitting in a circle on the floor sharing ideas.`<br> |
| 59 | +❌ `Nine people sitting on yellow pillows on the floor.` |
| 60 | + |
| 61 | +{ width="400" } |
| 62 | + |
| 63 | +✅ `Nothing Personal logo.`<br> |
| 64 | +✅ If the magazine's name is near-by, blank alt text might be the right thing to do with this image<br> |
| 65 | +❌ `NP. NP. NP. NP. NP. NP. NP. NP. NP.`<br> |
| 66 | +❌ `NP repeated 42 times in different colors.` |
| 67 | + |
| 68 | + |
| 69 | +## Additional Resources |
| 70 | + |
| 71 | +- [W3C Alt Text Decision Tree](https://www.w3.org/WAI/tutorials/images/decision-tree/) |
| 72 | +- [WebAIM Alternative Text](https://webaim.org/techniques/alttext/) |
0 commit comments