No [alt] Text for <object> Elements
Google Lighthouse system determines the elements that do not contain alternative texts. <object>
elements missing in this topic are flagged by the system.
How to pass the audit: Adding alternative text to <object> elements?
There must be text content inside the <object>
element. But if there is no such content, you must describe it. In the photo below, the section named 2019 Web Accessibility Report
is known as the description of the specified object. Here is the example below:
<object type="application/pdf" data="/report.pdf" width="600" height="400"> 2019 Web Accessibility Report </object>
How to write effective alt text?
- The prepared alternative text must necessarily represent the object in question.
- The main purpose of the alternative text is to explain the purpose of the object in question.
- You should completely avoid “chart”, “image”, or “diagram” words that do not help you directly describe the object you created.
Test Your Website Issues
You can quickly analyze your site