- From: Steve Faulkner <faulkner.steve@gmail.com>
- Date: Mon, 28 May 2012 13:12:46 +0100
- To: Ramón Corominas <listas@ramoncorominas.com>
- Cc: Harry Loots <harry.loots@ieee.org>, Glen Wallis <glen.wallis@gmail.com>, w3c-wai-ig@w3.org
- Message-ID: <CA+ri+VnjtteUg_GwDhEDNNBmcvWxkX_1fr_P8snz6bzEjRP52A@mail.gmail.com>
hi Ramon,
what is the advantage of your example code over use of title in tbhis case?
- 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
- 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<http://dev.w3.org/html5/spec/content-models.html#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.
In HTML 4/xhtml
an image MUST have an alt attribute otherwise its non conforming
The alt <http://www.w3.org/TR/html4/struct/objects.html#adef-alt> attribute
must be specified for the
IMG<http://www.w3.org/TR/html4/struct/objects.html#edef-IMG>and
AREA <http://www.w3.org/TR/html4/struct/objects.html#edef-AREA> elements.[4]
In HTML5, an image must have an alt alltribute unless it is inside a figure
element with a caption [3]
<figure>
<img>
<figcaption>caption text</figcaption>
</figure>
- 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
- 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.
- Do you consider this behaviour is consistent?
>
No.
[1] http://dev.w3.org/html5/spec/global-attributes.html#the-title-attribute
[2] http://www.w3.org/html/wg/wiki/ChangeProposals/notitlev2
[3]
http://dev.w3.org/html5/spec/the-img-element.html#guidance-for-conformance-checkers
[4] http://www.w3.org/TR/html4/struct/objects.html#adef-alt
regards
Stevef
On 28 May 2012 12:19, Ramón Corominas <listas@ramoncorominas.com> wrote:
> Hi, Harry and all.
>
> The code that you propose does not use a <label> to identify the <input>
> (there is no text inside the <label>, apart from the "value" that is not
> valid to give the control a name).
>
> However, the following code does exactly the same without a visual label,
> and without the need of a title attribute:
>
> <label for="tx-search" class="visually-hidden">Search text</label>
> <input id="tx-search" type="text" value="" />
> <button type="submit">Search</button>
>
> .visually-hidden {
> position: absolute !important;
> clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
> clip: rect(1px, 1px, 1px, 1px);
> padding:0 !important;
> border:0 !important;
> height: 1px !important;
> width: 1px !important;
> overflow: hidden;
> }
>
>
> So, my concerns are:
>
> - Why the title is GOOD for form controls and BAD for images?
> - Is it anywhere in the spec that the title attribute can convey the
> accessible name for form controls but not for images?
> - If this rule applies only to form controls, why is it allowed for them
> and not for other elements?
> - If this rule applies to any element except images, why are images an
> exception?
> - Do you consider this behaviour is consistent?
>
> I already know what WCAG says, what I would like to clarify is why the
> title attribute works differently for different elements and where the
> specs define the difference.
>
> Regards,
> Ramón.
>
>
>
> Harry wrote:
>
> I agree that there are situations where a visual label element is not
>> appropriate.
>>
>> However, instead of <input type=text title=search>
>> <button>search</search> (your example), why not use <label><input
>> type="text" id="search" value="search"></label><**button>search</button>?
>>
>
>
<http://www.paciellogroup.com/resources/wat-ie-about.html>
Received on Monday, 28 May 2012 12:14:01 UTC