Semantic Link Name

Serious - WCAG Level AA

The issue with the 'semantic-link-name' rule arises when links on a webpage do not have clear, descriptive text that indicates their purpose or destination. This can be problematic for users who rely on assistive technologies, such as screen readers, to navigate the web. When a link's text is vague or non-descriptive, it can lead to confusion and hinder the user's ability to understand the context or action associated with the link.

For users with visual impairments, screen readers read aloud the text of links. If the link text is generic, like "click here" or "read more," it doesn't provide enough information about what will happen when the link is activated. This can make it difficult for users to decide whether they want to follow the link.

To fix this issue:

Ensure that all links have descriptive text that clearly conveys the link's purpose. This involves:

  1. Using meaningful text within the <a> element that describes the destination or action.

  2. Avoiding generic phrases like "click here" or "more info."

  3. If the link is an icon or image, use alt attributes or ARIA labels to provide context.

Best practices:

  • Keeping link text concise yet descriptive and ensuring that it makes sense out of context.

    • For example, "Download the annual report" is more informative than "click here."

Common mistakes to avoid:

  • Relying solely on visual cues (like icons) without accompanying text or using the same link text for different destinations, which can confuse users relying on screen readers.