W3C home > Mailing lists > Public > public-html@w3.org > August 2007

Re: using an attribute to categorize the @alt state [was Baby Steps or Backwards Steps?]

From: Robert Burns <rob@robburns.com>
Date: Sat, 18 Aug 2007 20:21:21 -0500
Message-Id: <CC9C9A8C-4157-4706-ACE2-08A6C09857CD@robburns.com>
Cc: public-html WG <public-html@w3.org>
To: Philip Taylor <philip@zaynar.demon.co.uk>

Hi Philip,

On Aug 18, 2007, at 6:47 PM, Philip Taylor wrote:

>
> Robert Burns wrote:
>> [...] In an HTMl5 conforming document embedrel would be required.  
>> In other words: "authors MUST include the @embedrel attribute on  
>> any embedded content element". [...]
>> So this proposal also makes @alt no longer a required attribute.  
>> Instead it makes @embedrel a required attribute on all embedded  
>> content (non-text media) elements.
>
> One problem with adding new required attributes is that a large  
> amount of conforming HTML4 content will be made non-conforming  
> HTML5, and can not be trivially converted into conforming HTML5.

First, I'd say that there's no need for authors to go turn all of  
their HTML4 content into HTML5. That should be driven by the need to  
take advantage of HTML5 features. I don't think it will be a good  
idea for us to make authors think they're going to gain something  
simply by changing their declaration from one non-quirks mode doctype  
to the HTML5 non-quirks mode doctype. Converting to HTML5 therefore  
means an author wants to take advantage of HTML5 features.

As for trivially converting, I think it could be done rather easily.  
Authors are typically fairly familiar with their own authored  
content. They know whether their @alt values are meaningful or  
whether they added them to satisfy the validator. If its the former,  
then the IMG element's simply need to have alt='seefallback' added.  
If its the latter, then they need alt='missing' (optionally they can  
then strip the meaningless alt tags). If the author know they used  
alt='' to indicate decorative images, then embedrel='decorative' can  
be added to the IMG elements.  There may be some need for human  
interaction here, but for large groups of documents or entire sites  
created by the same authors its simply a matter of adding  
'seefallback', 'missing', or 'decorative' to the IMG elements. Some  
of those 'missing' keywords may also qualify for 'seecontext', and  
that would require some human intervention, but nothing requires  
authors to do that..

Also the proposal has backwards compatibility built in. By not having  
this attribute set, an HTML5 conforming UA treats the embedrel  
attribute as having a keyword 'undefined'. This lets the HTML5  
conforming UA know that the @alt attribute may not be used as  
precisely as it is in HTML5.

> As I understand your proposal, every <img> on a site would have to  
> (at minimum) be converted into <img embedrel="missing"> - depending  
> on how the site is produced, that would require changes to static  
> HTML files, HTML template files, HTML in print statements spread  
> throughout script code, fragments of HTML in databases; and most of  
> that work would have to be done manually rather than using  
> automatic conversion tools.

The conversions would only be required for those wanting to pass  
HTML5 conformance checking requirements. Sites could continue to  
serve HTML4  without any problems. Of those situations you list, only  
the databsse pages seems to me to be a concern. There, the HTML4  
fragments in the database would be combined with HTML5 templates or  
generated HTML5 to create a hybrid of content where @embedrel is set  
on some elements and not others. However, no one is typically runs  
these types of pages through a conformance checker anyway. I If they  
did, they would learn that their old HTML4 needed @embedrel  
attributes to be conforming HTML5. I don't really think that's a  
major problem compared to the problem we're trying to solve here  
(creating some sort of sanity around alt values).

> Currently, many conforming HTML4 documents can be made into  
> conforming HTML5 by just using the appropriate doctype. Requiring  
> authors to make all the above changes to use a new required  
> attribute, especially when it provides them with no value in any  
> current or future browser, seems likely to discourage many  
> standards-aware authors from ever wanting to migrate to HTML5.

Why do we want authors to change their doctype declarations to become  
conforming HTML5? Especially when that provides no value in any  
current or future browser? Adding the @embedrel attribute provides  
benefits. That's why I'm proposing it. Certainly batch converting all  
content by adding embedrel='missing' to every IMG element just to  
claim HTML5 conformance would be a bad idea. The point of converting  
the document in this case would be to add the richer information  
included in the embedrel attribute. Only then would this author or  
site gain any benefits from HTMl5 (not by just changing its doctype  
declaration). Adding sectioning elements or adding VIDEO, AUDIO,  
CANVAS, etc. all requires non-trivial author intervention. Sure,  
they're not required, but automating this task could be fairly simple  
to differentiate 'missing' from 'seefallback' from 'decorative'.  
Further differentiating 'seecontext' and 'icon' may require further  
author scrutiny, but it will benefit users. And just to repeat the  
proposal still works when @embedrel is absent since the value imputed  
by UAs will be either 'missing' if @alt is missing, 'decorative' for  
alt='' and 'undefined' for alt='<string length greater than 0'>.   
Even that will be at least as useful for users as the current  
situation and the current draft proposal.

Take care,
Rob
Received on Sunday, 19 August 2007 01:21:33 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:04 GMT