Re: QA Tips Error?

Peter Wootton <peter.wootton@bathroomtakeaway.co.uk>, 2019-11-06 15:58 +0000:
> Archived-At: <https://www.w3.org/mid/b3806292-c17b-9e33-010a-d0e059b1bab9@bathroomtakeaway.co.uk>
> 
> I wanted to bring your consideration that I consider that part of the QA
> tips found here http://www.w3.org/QA/Tips/good-titles could be both wrong
> and misleading.
> 
> I believe that having links within <h1> tags is semantically incorrect.
> 
> Did I miss something or is that indeed the case. Can you give further
> clarification on this?

The HTML spec doesn’t prohibit links within h1 elements:

https://html.spec.whatwg.org/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements

...and the W3C HTML checker (validator) at https://validator.w3.org/nu/
doesn’t emit any errors or warnings for headings that contain links.

So as far as the authoritative/normative requirements in the HTML spec
itself, and the behavior of the W3C HTML checker, neither the spec nor the
checker considers links within headings to be semantically incorrect.

That said, I can imagine it might be possible that some other best-practice
guides may recommend against using links in headings.

If you have any best-practices guides you could point us to which make such
a recommendation, then I think somebody could look into updating the
http://www.w3.org/QA/Tips/good-titles article to try to make sure it aligns
with the existing best-practice consensus.

  –Mike

-- 
Michael[tm] Smith https://people.w3.org/mike

Received on Thursday, 7 November 2019 06:08:03 UTC