Uploaded image for project: 'SonarHTML'
  1. SonarHTML
  2. SONARHTML-140

S1077 should not raise an issue on "<img th:alt=..."

    XMLWordPrintable

    Details

    • Type: False-Positive
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Rules
    • Labels:
      None

      Description

      The implementation of RSPEC-1077 (Image, area and button with image tags should have an "alt" attribute) should not raise an issue when an img tag has an alt attribute which is not in the "default" namespace.

      The following example is a Thymeleaf template which generates an alt attribute:

      <!DOCTYPE html>
      <html xmlns:th="http://www.thymeleaf.org">
        <body>
          <img th:src="${x}" th:alt=""/>
        </body>
      </html>
      

      See the Thymeleaf documentation.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              pierre-yves.nicolas Pierre-Yves Nicolas
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated: