org.sonar.l10n.web.rules.Web.RequiredAttributeCheck.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sonar-web-plugin Show documentation
Show all versions of sonar-web-plugin Show documentation
Analyze HTML (also within PHP/Ruby/etc. templates) and JSP/JSF code.
The newest version!
This rule checks that the specified attributes are present in HTML tags.
For a required attribute list of: img.alt,img.height,img.width
Noncompliant Code Example
<img src="/images/queen.png"> <!-- Noncompliant; missing all required attributes -->
Compliant Solution
<img src="/images/queen.png" width="60" height="85" alt="Elizabeth II">