Re: Adaptive Image Element Proposal

2012/8/31 Steve Faulkner <faulkner.steve@gmail.com>:
> When and if <picture> becomes implemented in browsers then the text
> alternative can be provided as text in the sub dom:
>
> <picture>
> This is the text alternative
> <img alt="">
> </picture>
>
> as I have previously mentioned I don't see what the problem is with doing
> the above now and visibly hiding the text using CSS.

Being able to mark parts of a text alternative as one natural language
and another part as a different language is another example of why it
would be interesting to be able to use more structure in the text
alternative.

But here are some problems that I see with the example that Steve sent
about how to provide the text as part of the sub dom and hiding it
using CSS.

A user agent that supports HTML 2.0, but not CSS or ARIA would ignore
any CSS to hide the text alternative and will present the text
alternative even if it can load the image.

A user agent that supports CSS but not the picture element would
always hide the text alternative (well depending on which media that
the CSS was specified for) even if the image cannot be loaded. Also
because the image has an empty alt attribute it would be marked as
presentational. Let’s say that ARIA isn’t supported, then you cannot
define the relationship between the text alternative and the image
(and if you could, this could lead us into the reference hidden
content issue again).

But on the other hand, if the alt attribute on the img element is used
for the text alternative it would work in both of these cases. Even in
a user agent that only supports HTML 2.0. But then you lose the
ability to add structure to the text alternative.

Received on Saturday, 1 September 2012 17:48:08 UTC