W3C home > Mailing lists > Public > www-style@w3.org > November 2014

Re: [css-pseudo] please make sure pseudo-element "alt" property makes it into next ED

From: James Craig <jcraig@apple.com>
Date: Tue, 11 Nov 2014 13:59:33 -0800
Cc: Daniel Glazman <daniel.glazman@disruptive-innovations.com>, www-style list <www-style@w3.org>
Message-Id: <059B317E-B1D0-4132-A1FD-388F33DA042B@apple.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>

> On Nov 5, 2014, at 5:29 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> In HTML, the alt attribute works literally by subbing the text in for
> the image.  

That's how the plain text pasteboard works, but not the screen readers.

> There's no difference, to a screen reader, between "<img
> alt=new> <img alt=warning>" and "new warning".

That's not right. These are image objects in the accessibility tree with url and label values. Depending on user settings, they be spoken a number of ways. Usual defaults are to speak a role description along with the alt, and potentially a braille shorthand.

So this markup and style:

    <img alt="bar" src="bar.png">
    <img alt="baz" src="baz.png">

  div::before { content: "foo"; }
  div::after { content: "bop"; }

Could be spoken be a screen reader as:

  "'new', image."
  "'warning', image."

The accessibility hierarchy would look something like this:

    - text node { value: "foo" }
    - image { label: "bar", url: "./path/bar.png" }
    - image { label: "baz", url: "./path/baz.png" }
    - text node { value: "bop" }
Received on Tuesday, 11 November 2014 22:00:01 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:51:49 UTC