Free scan

Fix "<object> element without alternative" in HTML

Why it's a problem

An <object> showing an image, a PDF or an animation has no accessible name by default. The screen reader reports it without being able to say what it contains. Fallback text between the tags only serves browsers that cannot render the resource: axe-core does not count it as an alternative.

How to fix it — HTML

Name the <object> with aria-label, aria-labelledby or title, and keep useful fallback content (a download link). For a simple image, prefer <img alt="…">.

Avoid
<object data="/rapport-2026.pdf" type="application/pdf" width="600" height="800"></object>
Correct
<object data="/rapport-2026.pdf" type="application/pdf" width="600" height="800"
        aria-label="Rapport d'accessibilité 2026 (PDF)">
  <a href="/rapport-2026.pdf">Télécharger le rapport d'accessibilité 2026 (PDF, 1,2 Mo)</a>
</object>

Check your site in 30 seconds

Conformly detects this kind of issue across all your pages, continuously, and alerts you on every regression.

Free scan

Other fixes