microtip icon indicating copy to clipboard operation
microtip copied to clipboard

role="tooltip" causes invalid HTML for anchor tags with href

Open Piggered opened this issue 4 years ago • 0 comments

This is an add-on to #5.

When using the library to an <a> tag with an href, the HTML becomes invalid according to the W3C validator.

For instance:

<a href="https://github.com/" aria-label="GitHub" data-microtip-position="bottom" role="tooltip">GitHub</a>

will produce the following error:

Attribute href not allowed on element a at this point.

Removing role="tooltip" clears the error, but the tooltip obviously won't work.

Piggered avatar Jun 29 '21 02:06 Piggered