Side navigation: Redundant image and textual link with redundant alt text

XMLWordPrintable

    Issue Summary

    Redundant alternate text is provided for "Test" image link.

    Steps to Reproduce

    1. Open the page.
    2. Navigate to the Side navigation.
    3. Using screen reader, navigate to the mentioned image link.
    4. Inspect the code.

    Screenshot

    Actual Results

    There are adjacent image and textual link such as "Test" which point to the same destination but are defined in separate <a> tags. Also the alternate text of the image link is same as the text of the textual link. As a result, screen reader users are presented with a repeated information of link which opens the same page.

    Expected Results

    Ensure that the image and text link that point to the same destination are combined into a single link as a link block.

    Apply the following changes:

    • Define the image and the link text within a single <a> element instead of separate <a> elements.
    • Ideally alternate text must be provided to all image links using the "alt" attribute. In this instance, since the image and the textual link point to an identical destination page, use an empty ‘alt’ attribute.
    • Use CSS if necessary to maintain the presentation of the content.

    Code Snippet

    <a href="/display/TEST/Test?src=sidebar" title="Test"><img class="avatar-img" src="/images/logo/default-space-logo.svg" alt="">
    <div class="name"><a href="/display/TEST/Test?src=sidebar" title="Test">Test</div>
    </a>

    Workaround

    Currently, there is no known workaround for this behaviour. A workaround will be added here when available.

    Environment

    MacBook Pro (16-inch, 2021)
    macOs Monterey Version 12.3.1
    Chrome - Version 101.0.4606.81 (Official Build) (64-bit)
    Firefox- Version 93.0 (32-bit)
    Safari- Version 15.3 (17612.4.9.1.5)
    JAWS- Version 2022
    NVDA- Version 2020.3
    Voiceover - Version Latest

          Assignee:
          Bohdan Hulovatyi
          Reporter:
          Rinku Kumar
          Votes:
          1 Vote for this issue
          Watchers:
          7 Start watching this issue

            Created:
            Updated:
            Resolved: