[whatwg] @aria-labelledby | Re: @generator-unable-to-provide-required-alt, figure with figcaption

Ian Hickson ian at hixie.ch
Mon Jun 17 13:58:48 PDT 2013


On Mon, 17 Jun 2013, Martin Janecke wrote:
> Am 17.06.2013 um 11:35 schrieb Steve Faulkner:
> > 
> > the restriction on figure/figcaption is only in the whawtg spec not 
> > the W3C HTML spec as it was not deemed a useful or practical 
> > restriction when reviewed by the HTML WG.
> 
> Sounds lovely, this would indeed solve my use case.

Could you elaborate on what your use case and why it's not handled?

I don't understand why <figure> as defined in the WHATWG spec doesn't work 
for your case. What does the page look like?


> I don't know how to assess that the restriction is dropped in a W3C 
> draft but still included in the WHATWG version, though. Is this 
> consensus and likely to become standard or still very uncertain 
> territory?

The W3C spec is a fork of the WHATWG standard. I can't speak for what 
they're doing (and this would be the wrong list to discuss it, anyway). As 
far as the WHATWG spec goes, we try to base decisions on use cases.

For <figure>, the idea is that it should be reasonable to style <figure> 
with something like:

   figure { float: right; }

If we don't say that <figure>'s contents can be moved in this way, then 
that becomes much less viable.

If what you want is just an inline image followed by some text, though, 
you don't need <figure> or title="" -- you can just put in the image and 
the text, as in:

   <img src="the image"> <!-- FIXME: replacement text is missing -->
   <p>More text...

It's hard to know without looking at specific examples exactly what the 
optimal markup should be, though.


On Mon, 17 Jun 2013, Steve Faulkner wrote:
> > Am 07.06.2013 um 23:13 schrieb Ian Hickson:
> > >>
> > >> <img src="..." title="image">
> > >
> > > If you have a caption from the user (as opposed to replacement 
> > > text), then this is a perfectly valid option. It's as valid as the 
> > > <figure> case, and means the same thing.
> 
> the above statement is bad advice:
> 
> browsers map title to the accessible name in accessibility APIs when alt 
> is absent, so--

...so the browsers are buggy. This is not unusual. File bugs. :-) Indeed, 
since you've demonstrated yourself able to write code, you could just go 
and fix the bugs directly. :-)

Writing specs for the lowest-common-denominator is not the way we'll get a 
usable, accessible Web. We might sometimes be forced to when there are 
compat requirements with massively deployed content that Web author are 
relying on that prevent certain behaviours from being fixed, but this 
really doesn't apply in the case of ATs, since the vast majority of 
authors have never tested how their pages work in ATs.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list