Re: title attributes on links

Hi, Steve and all.

 > what is the advantage of your example code over use of title
 > in this case?

Maybe the only minor advantage would be that, without CSS, the <label> 
is still there, but I was not really looking for "advantages", but 
consistency (that is, not using the title to convey an information that 
IMO should be conveyed through a <label>).


 >> - Why the title is GOOD for form controls and BAD for images?
 >
 > As I have explained previouslyand linked to deatiled reasoning [2],
 > the title and alt have different semantics

I apologise, I didn't see that link, I thought you were pointing to the 
H65 technique. Now I understand it much better.


 >> - Is it anywhere in the spec that the title attribute can
 >> convey the accessible name for form controls but not for images?
 >
 > In HTML5 [1] its says:
 > title attribute: "on interactive content, it could be a label for,
 > or instructions for, use of the element" it DOES NOT say that it
 > can be used to provide a text alternative.

Ok, but what about this:

<input type="image" src="icon-search.png" title="Search" />

Is the title valid in this case? Is it an input or an image? According 
to the spec, the only exception for <input> not being "interactive 
content" is type="hidden". Shouldn't this case be added as other 
"images" that require an alt?


 > In HTML 4/xhtml
 >
 > an image MUST have an alt attribute otherwise its non conforming
 >
 > The alt attribute must be specified for the IMG and AREA elements.[4]

Why the <input type="image" /> doesn't require an alt? Is there a 
reason? Just curious.


 >> - If this rule applies only to form controls, why is it allowed
 >> for them and not for other elements?
 >
 > the title is allowed on any element

I meant the rule that says that the title is enough to convey the 
accessible name, not the rule about what elements can have a title (smile)


 >> - If this rule applies to any element except images, why are
 >> images an exception?
 >
 > As I explained previously alt has a distinct semantic. Thus
 > authoring conformance requirements differ.

Ok, title conveys the accessible name for any element except for images 
that are not inputs because there is another attribute for that purpose. 
There is also an alt attribute for <input type="image" />, but in this 
case you can use title to convey the accessible name, because... [fill 
in the blank]


 >> - Do you consider this behaviour is consistent?
 >
 > No.

Thank you for your answers! I'm learning a lot (smile)

Cheers,
Ramón.

Received on Tuesday, 29 May 2012 15:31:57 UTC