[whatwg] alt="" and the <meta name=generator> exception

Edward O'Connor eoconnor at apple.com
Tue Jul 24 10:37:20 PDT 2012


Hi,

The spec currently disallows conformance checkers from reporting <img>
elements without alt="" attributes as an error when <meta
name=generator> is present[1].

This is problematic for two reasons:

1. Many tools which insert <meta name=generator> have done so for years
   simply as a means to mark content made with the tool, for marketing
   or similar reasons. Users of such tools want conformance checkers to
   catch missing alt="", and authors of such tools have stated that they
   are unwilling to stop emitting markup tagged with <meta
   name=generator>.

2. <meta name=generator> is a very coarse mechanism which applies to the
   entire document. Individual pages on large web sites are typically a
   mixture of content that comes partly from hand-authored templates and
   partly pragmatically generated. In such cases, a finer-grained
   mechanism could help template authors create accessible markup.

   For instance, consider a photo detail page at Flickr. The main
   content image is uploaded by Flickr users, who may have done so in
   bulk and it would be unreasonable for Flickr to prompt their users to
   provide alt="" text for all of their images. Other content images on
   the page may be present in Flickr's own templates; the Flickr
   developers would benefit from conformance checkers which would catch
   missing alt="" for the content images in the template but which would
   not warn about missing alt="" for the main, user-sourced image.

We could address this problem by making changes along these lines:

1. Drop the <meta name=generator> alt="" exception.

2. Mint a global boolean attribute that, when present, indicates that
   the element and its descendants are outside of the page author's
   control (at least insofar as author conformance criteria are
   concerned).

3. Add a new exception to the "Guidance for conformance checkers"
   section which prevents conformance checkers from emitting errors for
   missing alt="" in subtrees marked with the new attribute.

Some issues that come to mind:

1. What other author conformance criteria should conformance checkers
   relax in such subtrees?

2. Authors might start including such an attribute on the <html> element
   just to get some kind of "valid html5" badge without actually
   improving their pages.

3. What's a good name for such an attribute?


Ted

1. http://www.whatwg.org/specs/web-apps/current-work/multipage/embedded-content-1.html#guidance-for-conformance-checkers


More information about the whatwg mailing list