- Success Criterion 4.1.2
- Conformance level A
- W3C reference F20
Content Changes That Never Update Their Accessible Name
4.1.2 — Name, Role, Value
Scenario
Setting
A webinar platform's registration form
What’s wrong
Content changes on screen but its alt text / accessible name is never updated, so screen readers announce old, wrong information.
Example
<button class="avatar-upload">
<img src="upload-icon.svg" alt="Upload headshot">
</button>
<!-- after a successful upload, script swaps upload-icon.svg for check-icon.svg and shows "Uploaded" visually,
but the alt text stays "Upload headshot" --> Why it matters
A registrant using a screen reader hears "Upload headshot" even after uploading, and may try to upload the same file again, thinking it failed.
How to test
Inspect the control's accessible name/alt after the content changes: if the old value is still announced instead of the updated one, it fails.
How to fix
Update the accessible name in the same code path that swaps the icon, not just the src attribute.
<button class="avatar-upload" aria-label="Headshot uploaded">
<img src="check-icon.svg" alt="" aria-hidden="true">
</button> Outcome
A registrant hears confirmation that their photo uploaded and moves on to the next field.
Who is affected
Screen reader users confirming their photo uploaded cannot trust a label describing the button's old state.
Learn more
- Understanding Understanding document (opens in a new tab)
- Technique Related technique (opens in a new tab)
Related scenarios
- Custom Dropdown or Slider With No Accessibility API Support
- Scripted Link or Button With No Real Role or Keyboard Support
- Clickable Div Turned Into a Control but Given No ARIA Role
- Form Field With No Programmatic Label at All
- Assistive Technology Never Told Which Element Currently Has Focus
- Multi-Part Field Where Each Box Has No Individual Name