
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
Enables scanning of HTML, and JSP/JSF files.
This rule checks that the specified attributes are present in HTML tags.
Noncompliant Code Example
Given a required attribute list of: img.alt,img.height,img.width
:
<img src="/images/queen.png"> <!-- Noncompliant; missing all required attributes -->
Compliant Solution
<img src="/images/queen.png" width="60" height="85" alt="Elizabeth II">
© 2015 - 2025 Weber Informatics LLC | Privacy Policy