whatwg.org
whatwg.org copied to clipboard
Definitions in headings are visually unrecognizable
For example the heading of section 13.2.6.5 of the HTML spec is rendered as:
what you cannot see is that "foreign content" is hyperlinked clickable.
That's a definition, but valid point.
I wonder if we should solve the styling issue or instead attempt to move definitions out of headings as generally that seems like bad practice to me.
I think definitions in headings is fine, and the fact that it's not obvious that they're definitions is also fine? The point of definitions is to have something to link to; they don't need to be visually obvious, IMO.
The point is that html-dfn.js
turns these definitions into interactive elements and interactive elements should be visually recognizable.
Moving these definitions out of the headings could be one possible way of addressing this, and could probably also address whatwg/html#9811.
Yes, there are a number of interactable elements in HTML which are not properly marked up. It'd be nice to add some stuff to our build tools to emulate what Bikeshed (the other major spec build tool) does to them, which is add a little floating #
permalink indicator.
I don't know what you mean by "little floating #
permalink indicator.". The bikeshed whatwg specs use the same styling as the HTML spec.
They have different markup which sometimes helps (and sometimes does not), but for this they appear to have the same problem: https://fetch.spec.whatwg.org/#should-response-to-request-be-blocked-due-to-mime-type?
A quick PoC adding subtle 30% grey dotted underline:
body.dfnEnabled dfn { text-decoration: underline dotted var(--a-underline); }
doesn't make it too busy, but admittedly the dfns are a plenty, so it may seem like a noise somewhat.