- From: James Craig <jcraig@apple.com>
 - Date: Tue, 11 Nov 2014 13:59:33 -0800
 - To: "Tab Atkins Jr." <jackalmage@gmail.com>
 - Cc: Daniel Glazman <daniel.glazman@disruptive-innovations.com>, www-style list <www-style@w3.org>
 
> 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:
  <div>
    <img alt="bar" src="bar.png">
    <img alt="baz" src="baz.png">
  </div>
  div::before { content: "foo"; }
  div::after { content: "bop"; }
Could be spoken be a screen reader as:
  "foo"
  "'new', image."
  "'warning', image."
  "bop"
The accessibility hierarchy would look something like this:
  group 
    - 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