I have received a request to add links to certain headings (e.g. <h2><a href="">Heading</a></h2>). I am resisting this for a couple reasons. First, it just kind of rubs me the wrong way (admittedly not a very strong argument). Second, in my estimation of proper use of HTML, headings are not links and vice versa. I try not to link block-level elements, but I can't find any official documentation that supports that position.

Those in favor of linked headings argue that users expect to be able to click headings (i don't entirely buy this since it has not been supported by any data, but let's grant it for argument's sake). The problem is consistency. If you are going to link a heading because the user expects it, then ALL headings should be links. However, there is not always a logic destination to link to. Therefore linking headings introduces inconsistent behavior.

Can anyone provide an argument for the use of linked heading elements?

1 answer

3
points

I can think of one argument for: On a home page with what is now commonly called a blog intro layout, you typically have heading, paragraph about article (or simply first para of article) and a "read more" link.

Now "read more" is terrible accessibility, especially for those screen readers which handle links from a page as a separate list. But the text of the heading is usually the perfect context-rich, SE-friendly text for the link to the article.

Optimal solution: link the heading, and use a linked "read more" image at the end of the intro. This should keep everyone happy, including those who don't expect the heading to be a link.

Answered about 9 years ago by Richard Grevers