[whatwg] was The <pic> element, now about alt text

David Dailey ddailey at zoominternet.net
Mon Jun 4 11:29:35 PDT 2012

On  Monday, June 04, 2012 1:30 PM
David Singer wrote

>This may be an aside to the current discussion, but actually I think that
user-presentable text should *never* be in an attribute.  Why?

>1) 'ML' stands for markup language; what's in the markup should be
information about the content, not the content itself.

>2) More important, when text is in an attribute, it's not amenable to
markup. You want to style the alt text, or associate it with a CSS class, or
tag it with a language, script, or writing direction, or.?  It needs to be
in the content, and then that's all possible.

>I realize that changing where alt text is for existing elements would
be.problematic.but I don't think we should propagate the error further.

This thinking seems very valid to me. By extension, when the semantics of
the language is geometry, as in SVG, then relegating that content to CSS
rather than the DOM would be even a tad worse than injecting it into
attributes. Actual nodes seem to be where the meaningful nouns of a language
should be with attributes being for adjectives and styles for adverbs. The
verbs are, by this metaphor, behaviors as revealed through script or
declarative constructs.


More information about the whatwg mailing list