> This exposes a single text node of "My text"
> <div role="presentation">
> My text
> </div>
Why?
Are you saying that placing role="presentation" on that node means the
@role of presentation doesn't apply to descendant text nodes? Isn't
that breaking normal containership convention? Or am I
misinterpreting?
So that should include all of the contents of the node? therefore:
<div role="presentation">
Text goes here.
<em>Emphasized text here</em>
Final text here.
</div>
A screen reader encountering this should read nothing, given that the
entire div has a role of presentation, correct?
Thanks,
> If the AT accesses the accessibility API, anything with
> role="presentation" disappears from the accessibility tree. So ATs
> which access only the accessibility API should be golden: NVDA,
> JAWS, Window-Eyes, Orca (Linux). ... JAWS I know does.
>
> Rich
Some of the ATs you list there may not just use the accessibility API
for everything. Specifically, some Windows screen readers may use
ISimpleDOMNode for their virtual buffer. I think we need someone to
test role="presentation" both in virtual buffers as well as in forms
mode, for each screen reader. Testing what happens for tables as well
as more basic scenarios is important.
- Aaron
> That's just what role="presentation" does -- it doesn't inherit. It's
> saying that the given element is there to help with the layout.
>
> Some things in web world inherit to descendants and some don't.
> There's no general rule for everything.
Sure, I get that there's no general rule for everything.
I guess what I'm saying is that this seems counter-intuitive to me --
I was expecting the presentation role to apply to descendants.
Is there an ARIA alternative to role="presentation" that does *not*
expose the node's descendants to AT, via whatever mechanism for the
example I had posted earlier?
<div>
Text goes here.
<em>Emphasized text here</em>
Final text here.
</div>
Thanks,
No.
> <div role="presentation">
> Text goes here.
> <em>Emphasized text here</em>
> Final text here.
> </div>
>
> A screen reader encountering this should read nothing, given that the
> entire div has a role of presentation, correct?
Incorrect. It _might_ read "Text goes here. /Emphasised text here/ Final
text here."
http://www.w3.org/TR/wai-aria/#presentation:
"The user agent MAY choose not to present all structural aspects of the
element being repurposed … while preserving the individual text elements
within them"
Note this is a "MAY" not a "SHOULD" or a "MUST". A user-agent could
comply to the draft by exposing a layout table as if it were data table,
AFAICT.
I'm not sure what the spec thinks it means by "text elements"; clearly
it includes text nodes, but attributes like alt and title could also be
called "text elements".
--
Benjamin Hawkes-Lewis
> Don't think of it as hiding content from the user. Think of it as
> saying that a given element is being used as tag soup to get the
> formatting right across browsers
Right, I get that, for role=presentation. Is there an ARIA mechanism
that does what I'm suggesting? Some aria attribute that says "ignore
this node and its contents" -- that's what I'm after at this point.
Pretend that I never asked about role=presentation :)
If there is, I'd love to know. If there isn't, I'd love to know that as well.
I was wondering about aria-hidden, but it looked more like that was
indeed an aria state that was designed to mirror the actual state,
much as you describe.
> What's the use case? Maybe we made the wrong call in Firefox, and the
> implementation guide should be changed to say that aria-hidden should
> always rule if it exists.
I think that's what I'd like, personally. In some cases I'd want the
contents of the subtree exposed for someone that *can* see the page,
but hidden where we've got aria attributes to do some of the work for
us.
> As an evil workaround for now, you can use <img alt="HIdden content"
> role="presentation"/>
Did you really just type that? ;)
I think PFWG and the ARIA implementors will need a specific example of
where this is useful.
One case I was thinking of was, if there was a way to expose a "jump
to main content" link which would be exposed only if the current
browser/AT combo didn't support role="main". However, since focusable
items really need to always be exposed even in the aria-hidden case,
that might not be easy. We could try to expose the skip link only to
virtual buffers, like this:
<a onclick="browser.location="blah.com/#main" role="presentation"></a>
In theory that might only be noticed by the NVDA/JAWS/Window-Eyes
virtual buffer if ARIA was not supported. If ARIA was supported, on
the other hand, the role="main" later in the document would work.
But, that's just talk since I haven't tried it.
Anyway, can you give more info on your particular use case ideas?
- Aaron
Consider the tree widget example at the beginning of the ARIA draft.
For sighted users, this depends completely on background images to
indicate the open/closed status of branches. This will break for users
applying their own styles or with images disabled. This is a Bad Thing.
Something like:
<span role="completely-ignore-contents">(Open)</span>
<span role="completely-ignore-contents">(Closed)</span>
styled with the CSS3 reworking of the "content" property would create
indications that will work for such users too.
(In practice, today you'd probably use <img alt="Open"> or more brittle
forms of CSS image replacement using background-image because only Opera
and WebKit have reworked "content" to do image replacement, but you get
the idea.)
However, you wouldn't want that node exposed to users whose clients are
reporting the open/closed status via ARIA in some fashion, because then
the same information would be presented twice.
--
Benjamin Hawkes-Lewis
So in your view, when the spec says "text elements" it (should) mean
"text node children" (as opposed to attribute nodes, element children) etc.
While I think it would be appropriate for examples in the draft to use
this "img" markup (as "content" hasn't been finalized), what does happen
when you want the image kept in the CSS layer (where it logically
belongs) for skinning purposes? We don't want to be stuck using "img"
for that forever - and it's not likely to see wide adoption by libraries
trying to facilitate skinning.
--
Benjamin Hawkes-Lewis
But how would catching up with ARIA solve the problem I mentioned for
users (partially or completely) applying their own styles - e.g. their
own color scheme? They aren't using special AT; they're just configuring
their browser.
--
Benjamin Hawkes-Lewis
I think we're talking at cross-purposes. ;)
As far as I can tell, the conflict I'm talking about would exist even if
all AT and browsers supported ARIA and CSS3, as they are currently
drafted. Prevalence of support for these technologies would not improve
the situation without additional features.
There are four groups of users I'm talking about.
1. Users of AT that will read/braille the state via ARIA roles.
2. Users not using AT and consuming all publisher styles.
3. Users not using any AT and consuming a subset of publisher styles
(e.g. everything except they are enforcing their own color scheme and
rejecting CSS images, perhaps for colorblindness reasons).
"aria-expanded" cannot help these users. (If it can, then how can it?)
4. Users not using any AT and rejecting all publisher styles (for
whatever reason). I suppose "aria-expanded" could help these users if
anyone could work out appropriate default styling for the property.
As far as I can tell, the "right" way (assuming CSS3 support) to
indicate the tree item state to all four groups is to use a "span" whose
content is replaced with an image using 'content'. But if you do that,
there's no way to save Group 1 having to consume the information twice:
<li role="treeitem" aria-expanded="true"><span>Expanded:</span> Small
Breeds
If there was a way to indicate that the textual information in the
"span" was simply expressing information implicit in the ARIA properties
or, more crudely, a way to tell ARIA-inflected renderings to ignore the
supplementary text, then there would be a way to prevent duplicated
rendering.
Does that make sense?
--
Benjamin Hawkes-Lewis
> <span>Expanded:</span>
Why is that the "right" way, as opposed to
<span class="expanded"/>
Who is the text in there for at this point, if aria-expanded="true"
and the user has ARIA support?
- Aaron
How would that communicate the information to a user who isn't using AT
and doesn't see images?
> Who is the text in there for at this point, if aria-expanded="true"
> and the user has ARIA support?
Groups 3 and 4 in my breakdown.
What would ARIA conformance do for those user groups?
--
Benjamin Hawkes-Lewis
Interesting. By the current drafts, wouldn't the image's description
still be "expanded" and its text equivalent still be "expanded" even if
it's accessible name was ""?
> I guess it will take some experimentation.
>
> I'll admit I don't know everything about groups 3& 4. It would be
> good if I had more user data on who these people are and what the
> benefits are to adding the word 'expanded". To be honest I'm
> wondering how necessary that really is. Would some non-AT users
> really want to see the word "expanded" right in the tree? Does this
> give them something that the level of indentation doesn't? Honestly I
> think that would just make the tree more confusing.
You're right, sorry, my example's perhaps a bit off. Although tree UIs
do tend to distinguish between expanded items and leaf nodes as a hint
that users can close the former, it's "closed" that wouldn't be obvious:
* z
* b
* f
* g
* n
* q
* x
* c
It's obvious that some of those items are expanded. But there's no way
to distinguish closed items from items without children (other than
manually trying to open "z, "f", "n", "q", "x", and "c"). That's why
tree UIs must distinguish between an expandable node and a leaf node
(using a plus icon in Windows or a right-pointing arrow on OS X, for
example).
---
Benjamin Hawkes-Lewis
The problem is perhaps even clearer with another example from the spec:
<li role="menuitemcheckbox" aria-checked="true">Sort by Last Modified</li>
* Sort by Last Modified
Is that checked or unchecked?
--
Benjamin Hawkes-Lewis