Blank Target
Minor - WCAG LEVEL AAA
The 'blank-target' accessibility issue arises when links open in a new window or tab without informing the user. This can be disorienting, especially for users with cognitive disabilities or those using screen readers, as they may not realize a new window has opened, leading to confusion and potential loss of context.
How to fix it:
To address this, links with
target="_blank"should include a warning in the link text or an adjacent element to inform users of the behavior. This is crucial because screen readers and other assistive technologies may not announce the opening of a new window, leaving users unaware of the change in context.Ensure that any link opening in a new window includes a textual indication. This can be done by appending text like "(opens in a new window)" to the link text itself or by using an
aria-labelattribute to provide additional context.
Best practices include:Consistently informing users about new windows across your site.
Using clear and concise language to describe the behavior.
Avoiding reliance solely on visual indicators like icons, which may not be accessible to all users.
Common mistakes to avoid include:
Failing to update the link text when the link behavior changes.
Using icons without text descriptions, which can be missed by screen readers.
Assuming users will understand the behavior without explicit instructions.
By implementing these changes, you ensure a more predictable and user-friendly experience, particularly for users relying on assistive technologies.