RE: First draft of ARIA 1.1. "text" role

James,

I have another example. 

Suppose that you want to display and read a static text "Out of Stock" in red letters for an item to indicate that being out of stock is a bad thing.
The visual creative team will flame you when you add status icons, underline things, provide additional characters etc. to signal that differently.

You are using Jaws 15 with IE 11 on Win7 (all 64bit). You start with this:

	<span style="color:red">Out of Stock</span>

In a first attempt, you can do a

	<span style="color:red" aria-label="Out of stock - Critical">Out of Stock</span>

Since label overrides inner text node (according to spec) you have to provide the visual text redundant in aria-label.

Or alternatively:
 
	<span id="D1" style="color:red" aria-describedby="D1 D2">Out of Stock</span>
	<span id="D2" style="display:none" aria-hidden="true">Critical</span>

Now you fire up Jaws and immediately have multiple things to deal with:

1. Having not applied a role to <span> will cause Jaws to ignore label / describedby info entirely in its VPC mode.
2. Nevertheless, with <body role="application" Jaws WILL speak both examples (!!!)

 All right you say, role=application does the trick but unfortunately  is deprecated in ARIA 1.1, so don't rely on this. 
So, you have to have a role to get Jaws speaking this. You scan the role combinations and find that either

- most of widget roles are inappropriate although Jaws speaks label / described info for it
- most of the structural roles are considered as "spans" and Jaws won't speak label / described info

And here it is where role=text comes into play. Having role=text added like

<span role="text" style="color:red" aria-label="Out of stock - Critical">Out of Stock</span>

can serve as an information "hook" for screen readers to speak the extended labelling info.

To HTML guys: Yes I know that there are other techniques to achieve that effect (which all are workarounds and change the UI), and that Jaws is even capable to read CSS color values if user wants so but that misses the point (no semantics, just color values) and that is IMHO where ARIA labelling is brilliant for.

- Stefan



-----Original Message-----
From: James Craig [mailto:jcraig@apple.com] 
Sent: Montag, 10. November 2014 22:13
To: Steve Faulkner
Cc: W3C WAI Protocols & Formats
Subject: Re: First draft of ARIA 1.1. "text" role


> On Nov 10, 2014, at 12:44 PM, Steve Faulkner <faulkner.steve@gmail.com> wrote:
> 
> 
> On 10 November 2014 19:40, James Craig <jcraig@apple.com> wrote:
> First draft of ARIA 1.1. "text" role
> http://rawgit.com/w3c/aria/master/aria/aria.html#text
> 
> unclear why
> <img src="icon.gif" alt="heart" role="text" aria-label="heart">
> requires the addition of the aria-label,? when img role is overridden by other roles alt still works to provide the accessible name. 

Quoting from the next line: "Because the element is no longer an image, the role-specific host language labeling mechanism (e.g. img@alt) no longer applies."

> also why does the default implicit role need to be included as fallback, if role=text is not recognised wouldn't it just default to img?

The second example uses an img element (<img role="text">) and is in line with your understanding of implicit role fallback. The first example uses span (<span role="text img">) and therefore needs the "img" fallback role.

James

Received on Tuesday, 11 November 2014 08:46:00 UTC