[whatwg] Allow Fallback Text to Render Section Titles in Outlines
hugh.guiney at gmail.com
Fri Feb 10 21:18:46 PST 2012
Currently when I run markup like this through outliner programs, they
return blank section titles:
<h1><img src="/img/logo.png" alt="Company Name" /></h1>
I feel that in both instances, "Company Name" should become the
section title for the respective section.
Yes, I could use CSS image replacement to work around this issue, but
that is a hack—it isn't semantically accurate as the image is not a
decorative background, but in fact a important piece of content which
should still appear with CSS off. Similarly, repeating the alternative
text outside of the image and hiding it with CSS would be redundant,
both visually and to screen readers, with CSS off.
I could also use CSS @font-face rules to embed the logo font and just
use text, but not all fonts have licenses that permit doing so; many
explicitly forbid @font-face linking or specify that only graphical
renderings are allowed. I also often receive fonts from clients that
have modified letterforms, but have not been made into general-use
fonts, which makes embedding impossible.
So, text-as-graphics, while not ideal, is sometimes the only option.
Since both img and svg fall under h*’s content model (phrasing
content), it only makes sense to allow their fallback text to be used
as section titles. This would aid accessibility and meet author
expectation—in addition to mine, see for instance this person, who
filed it as a bug under a particular implementation:
More information about the whatwg