Skip to main content
HTML Validation

The “link” role is unnecessary for element “a” with attribute “href”.

About This HTML Issue

An a element with an href attribute provides a link to a resource, so adding the link role to it is redundant.

When not using semantic HTML for its intended purpose, interactive features must be re-implemented. For example, when role="link" is added to an element, the tab key should enable giving focus to the link and the enter key should execute the link when focused.

Learn more:

Last reviewed: November 30, 2022

Was this guide helpful?

Find issues like this automatically

Rocket Validator scans thousands of pages in seconds, detecting HTML issues across your entire site.

Ready to validate your sites?
Start your free trial today.