W3C home > Mailing lists > Public > public-html-a11y@w3.org > May 2011

Re: [Bug 12587] AT shouldn't see img@alt="" and img@role=presentation as 100% synonyms

From: Richard Schwerdtfeger <schwer@us.ibm.com>
Date: Tue, 3 May 2011 09:53:49 -0500
To: Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no>
Cc: Steve Faulkner <faulkner.steve@gmail.com>, public-html-a11y@w3.org, public-html-a11y-request@w3.org
Message-ID: <OF110BF21D.EA5565C6-ON86257885.00515517-86257885.0051D484@us.ibm.com>

Rich Schwerdtfeger
CTO Accessibility Software Group

public-html-a11y-request@w3.org wrote on 05/03/2011 09:32:22 AM:

> From: Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no>
> To: Steve Faulkner <faulkner.steve@gmail.com>
> Cc: public-html-a11y@w3.org
> Date: 05/03/2011 09:38 AM
> Subject: Re: [Bug 12587] AT shouldn't see img@alt="" and
> img@role=presentation as 100% synonyms
> Sent by: public-html-a11y-request@w3.org
> Steve Faulkner, Tue, 3 May 2011 14:33:58 +0100:
> > hi leif,
> >
> >>However, as sole content inside a link, it should probably be invalid
> > to use role=presentation.
> >
> > my understanding is that it is invalid in HTML5
> >
> http://dev.w3.org/html5/spec/embedded-content-1.html#a-link-or-
> button-containing-nothing-but-the-image
> That text doesn't speak about @role=presentation. It only speaks about
> @alt. Thus, per HTML5, this could be valid:
> <a href="green.html"><img role=presentation src="green.jpeg"
> alt="Green"></a>
In this case it should be invalid to have role="presentation" on an element
that has alt text that is not empty. Here the image is not presentational.
Also, any image with a title attribute should not have role="presentation"

The only time role="presentation should be allowed on an image is when it
does not have an form of alternative text such as:

- alt=""
- title=""
either alt or title are absent as properties

WCAG should require (probably does) that an image used to represent the
link must have alternative text.

> That section should be improved by adding that such IMGs are restricted
> from having role=presentation.
> The WAI-ARIA weak table makes no restrictions on the role of an IMG
> whose @alt is non-empty. [1] Thus it is fully valid to set an img with
> non-empty alt to role=presentation. I agree with that table on that
> point, even if it perhaps only catches an edge use case. But for IMGs
> that (for AT) act as links or buttons, I see no use case for permitting
> role=presentation.
> [1] http://dev.w3.org/html5/spec/content-models#table-aria-weak
> --
> Leif H Silli
Received on Tuesday, 3 May 2011 14:54:50 UTC

This archive was generated by hypermail 2.4.0 : Friday, 20 January 2023 19:59:01 UTC