Skip to content

Files

Latest commit

 

History

History
30 lines (21 loc) · 1017 Bytes

a11y-missing-attribute.md

File metadata and controls

30 lines (21 loc) · 1017 Bytes

Pattern: Missing accessibility attribute

Issue: -

Description

Enforce that attributes required for accessibility are present on an element. This includes the following checks:

  • <a> should have an href (unless it's a fragment-defining tag)
  • <area> should have alt, aria-label, or aria-labelledby
  • <html> should have lang
  • <iframe> should have title
  • <img> should have alt
  • <object> should have title, aria-label, or aria-labelledby
  • <input type="image"> should have alt, aria-label, or aria-labelledby
<!-- A11y: <input type=\"image\"> element should have an alt, aria-label or aria-labelledby attribute -->
<input type="image">

<!-- A11y: <html> element should have a lang attribute -->
<html></html>

<!-- A11y: <a> element should have an href attribute -->
<a>text</a>

Further Reading