Skip to content

Improper Use of Link rule and anchors without href (discussion needed) #1694

@amberhinds

Description

@amberhinds

Driscoll has this code flagging an improper use of link:
<a id="meet-the-team"></a>

Technically, this is valid HTML. W3 says:

The following example names a destination anchor with the id attribute:

I just returned from vacation! Here's a
<A id="anchor-two">photo of my family at the lake.</A>.

I don't like using an anchor as the landing point on a jump link when you could use something else with an id, since it would likely still be styled visually like a link, though it would do nothing when clicked and would not be keyboard focusable.

This possible user confusion may be reason enough to leave our rule alone, however since this is technically valid HTML, I wanted to open discussion on whether our rule should be modified.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions