Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-15723

'Alt' attributes not detected for links that contain images

    Details

    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      AFFECTS:

      • All pages
      • xwiki:XWiki.WatchListRss
      • xwiki:Main.WebHome
      • etc.

      ERROR:

      • org.xwiki.test.webstandards.CustomDutchWebGuidelinesValidationTest.Validating HTML5 Dutch Web Guidelines validity for: xwiki:XWiki.WatchListRss executed with credentials Admin:admin (from org.xwiki.test.webstandards.AllTests)
      • ERROR: At least one link contains only an image without a correct alt attribute (not empty), links can contain img with an empty attribute only if it also contains text.

      INVALIDATES:

      EXPLANATION:

      • We have 3 links with images (img) in an empty page. 2 of these 3 links fail the validation.
        • Fail - Ex1:
          <a href="/xwiki/bin/view/Main/" title="Home" rel="home" class="navbar-brand">
            <img src="/xwiki/bin/download/FlamingoThemes/Iceberg/logo.svg" alt="Wiki Logo"/>
          </a>
          
        • Fail - Ex2:
          <a href="/xwiki/bin/view/XWiki/Admin">
            <img class='avatar avatar_120' src='/xwiki/bin/skin/resources/icons/xwiki/noavatar.png' alt='Administrator' title='Administrator'/>
          </a>
          
        • Success - Ex3:
          <a href="/xwiki/bin/view/XWiki/Admin" class="icon-navbar">
            <span class="sr-only">User Profile</span>
            <img class='avatar avatar_50' src='/xwiki/bin/skin/resources/icons/xwiki/noavatar.png' alt='Administrator' title='Administrator'/>
          </a>
      • The alt values for all these images are non-empty, so the test should validate.

      FIXES:

      • VAR1: Fix the test validation so that the non-empty alt attributes are detected
      • VAR2: Add text inside the link node using the .sr-only class

        Attachments

          Activity

            People

            • Assignee:
              mflorea Marius Dumitru Florea
              Reporter:
              evalica Ecaterina Moraru (Valica)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Date of First Response: