|
| 1 | +# WAVE Known Accessibility Issue: Alert - A nearby image has the same alternative text |
| 2 | +- WAVE Category: Alert |
| 3 | +- WAVE Alert: A nearby image has the same alternative text |
| 4 | + |
| 5 | +## Page Content Status |
| 6 | +- [ ] WAVE Error guidance text |
| 7 | +- [ ] Example of a DOM Snippet Generated From WAVE Tool |
| 8 | +- Project Team Error guidance |
| 9 | + - [ ] Project Team Page Details |
| 10 | + - [ ] Project Team Issue and PR details |
| 11 | + - [ ] Project Team Solution |
| 12 | +- [ ] Credits/Authors |
| 13 | + |
| 14 | +## WAVE Guidance |
| 15 | + |
| 16 | +WAVE Tool's Reference material on A nearby image has the same alternative text may not specifically address your problem. We provide it here for optional reading. |
| 17 | + |
| 18 | +??? Info "Click to see WAVE Tool Reference" |
| 19 | + |
| 20 | + This content added 2026-03-10. Check for updated guidance at: <a href="https://wave.webaim.org/api/docs?format=html#alt_duplicate" target="_blank">https://wave.webaim.org/api/docs?format=html#alt_duplicate</a> |
| 21 | + |
| 22 | + <!-- Note For Wiki Author: WAVE Tool text content will use text that break markdown generation for the details dropdown. If the copy/pasted text includes angle brackets, surround them with backticks to avoid this problem. --> |
| 23 | + |
| 24 | + > ### WAVE Category |
| 25 | + > Alerts |
| 26 | + |
| 27 | + > ### WAVE Error |
| 28 | + > A nearby image has the same alternative text |
| 29 | + |
| 30 | + > ### What It Means |
| 31 | + > Two images near each other have the same alternative text. |
| 32 | + |
| 33 | + > ### Why It Matters |
| 34 | + > When two images have the same alternative text, this often causes redundancy or indicates incorrect alternative text. |
| 35 | + |
| 36 | + > ### What To Do |
| 37 | + > Ensure that the alternative text for each image or image button is appropriate while removing unnecessary redundancy. If the content of the image is already conveyed elsewhere (through text or the alternative text of a nearby image) or if the image does not convey content, the image may generally be given empty/null alternative text (alt=""). Image buttons always convey a specific function, and thus cannot be given null alternative text. |
| 38 | + |
| 39 | + > ### The Algorithm... in English |
| 40 | + > The same alternative text (case insensitive, but not null/empty) is present for two images or image buttons (<input type='image'>) near each other (no more than 2 other images separate them). |
| 41 | + |
| 42 | + > ### Standards and Guidelines |
| 43 | + > - 1.1.1 Non-text Content (Level A) |
| 44 | + |
| 45 | +## Example of a DOM Snippet Generated From WAVE Tool |
| 46 | + |
| 47 | +> ```html |
| 48 | +> [HTML snippet showing the problematic code structure that WAVE detected] |
| 49 | +> ``` |
| 50 | +
|
| 51 | +
|
| 52 | +## Project Team Error guidance |
| 53 | +
|
| 54 | +The following material covers how the Project Team has provided a solution to the [Alert/ARIA/Contrast Error/Error Name] WAVE [Alert/ARIA/Contrast Error/Error]. |
| 55 | +
|
| 56 | +### Project Page Details |
| 57 | +- Project Page name: [INSERT PAGE NAME or "ALL"] |
| 58 | +- Project Dev URL: [INSERT URL or "N/A"] |
| 59 | +- Requires sign in: [TRUE OR FALSE] |
| 60 | + - Required User Role: [INSERT ONE OF: Visitor, Logged in user, Admin, Security Admin] |
| 61 | + - Can access page directly from URL: [TRUE OR FALSE] |
| 62 | + - Accepts URL parameters: [TRUE OR FALSE] |
| 63 | +
|
| 64 | +### Project Team Issue and PR details |
| 65 | +- Related GitHub Issue(s): |
| 66 | + - [INSERT ISSUE URL] |
| 67 | +- Related Pull Request(s): |
| 68 | + - [INSERT PR URL] |
| 69 | +- React Component(s) |
| 70 | + - [INSERT PATH: e.g. path/to/Component.jsx] |
| 71 | +
|
| 72 | +### Project Team Solution |
| 73 | +
|
| 74 | +#### What is the specific problem that was occurring? |
| 75 | +<!-- Author Instructions: Add a detailed explanation of the specific accessibility problem, including context about when/where it occurs, what elements are involved, and why it's problematic for assistive technology users --> |
| 76 | +[INSERT CONTENT] |
| 77 | +
|
| 78 | +#### What is the proposed solution to this problem? |
| 79 | +<!-- Author Instructions: Add a few sentences describing the fix. "Why the Fix Works" comes later (see below). If there are lots of instructions required to explain the solution, include them in Developer Resources below --> |
| 80 | +[INSERT CONTENT] |
| 81 | +
|
| 82 | +#### Step-By-Step Guide |
| 83 | +<!-- Author Instructions: Replace details dropdown with N/A if this does not apply --> |
| 84 | +
|
| 85 | +??? Info "Click to see step-by-step guide" |
| 86 | +
|
| 87 | + [ADD DETAILED INSTRUCTIONS HERE] |
| 88 | +
|
| 89 | +#### Other Technical Details |
| 90 | +<!-- Author Instructions: Write N/A if this does not apply --> |
| 91 | +
|
| 92 | +??? Info "Click to see other technical details" |
| 93 | +
|
| 94 | + [INSERT OTHER DETAILS e.g. Prop References, Return Value ] |
| 95 | +
|
| 96 | +#### Code Snippet With Solution |
| 97 | +??? Info "Click to see code snippets" |
| 98 | +
|
| 99 | + [INSERT PATH file/path/to/Snippet.jsx] |
| 100 | +
|
| 101 | + ```jsx |
| 102 | + [Code example showing the fix/solution] |
| 103 | + ``` |
| 104 | +
|
| 105 | +#### Why the Fix Works |
| 106 | +<!-- Author Instruction: Add an explanation of how the code changes resolve the accessibility issue and why this approach was chosen --> |
| 107 | +[INSERT CONTENT] |
| 108 | +
|
| 109 | +#### Where this solution is applicable |
| 110 | +<!-- Author Instruction: Add a bullet point list of scenarios that might trigger this error and would be fixed by applying the provided solution, e.g. particular groupings of html elements, user interactivity, code-specific edge cases --> |
| 111 | +- [INSERT SCENARIO 1] |
| 112 | +- [INSERT SCENARIO 2] |
| 113 | +- [INSERT SCENARIO N] |
| 114 | +
|
| 115 | +#### Screenshots of WAVE Error |
| 116 | +
|
| 117 | +<!-- Author Instructions: when including markdown images, ensure they are responsive by specifying EITHER width OR height. Do not provide both. --> |
| 118 | +
|
| 119 | +??? Info "1. Descriptive Title for Screenshot Set 1" |
| 120 | +
|
| 121 | + Description/text for image |
| 122 | +
|
| 123 | + [INSERT IMAGE HERE] |
| 124 | +
|
| 125 | +## Credits/Authors |
| 126 | +<!-- Author Instructions: Add bullet points with GitHub handles of all HfLA members who contributed to this wiki page and/or contributed to Pull Requests that provided solutions for this page --> |
| 127 | +- @Rabia2219 |
| 128 | +- [INCLUDE Contributor 2] |
| 129 | +- [INCLUDE Contributor N] |
0 commit comments