RE: ARIA in HTML: clarify when ARIA attributes can be written in markup

Jukka -

It sounds like it is to avoid the case where, for example, you type
aria-hidden="true" into the code. But, you expect your script to switch
that to aria-hidden="false" at some point. If scripting isn't available,
the hard-coded aria-hidden="true" will always be there, preventing access
to the content with a screen reader.

So, examples (though these don't necessarily represent the best way to
code)

Case a) role="banner" (no scripting involved)
Case b) Any time there's really no content or functionality without
scripting: For example, aria-hidden="true" on a button to "Add Special
Effects," when the special effects are only available with scripting on.
When scripting is on, the script changes aria-hidden="false"
Case to avoid) Anytime things would be less accessible or less accurate if
the ARIA is there and the scripting is not there. For example,
aria-hidden="true" on second level nested lists, where JavaScript is used
to turn that list into an expandable/collapsible menu, and JavaScript
changes aria-hidden="false" as needed. Without scripting, this would be a
nested list of links, which is useful for anyone. But, if the script magic
is done half as hard coded attributes and half within the script itself,
as described, the nested lists won't be available to screen readers users.

-----Original Message-----
From: Jukka K. Korpela [mailto:jukka.k.korpela@kolumbus.fi]
Sent: Tuesday, May 28, 2013 2:07 PM
To: public-html@w3.org
Subject: ARIA in HTML: clarify when ARIA attributes can be written in
markup

The document "Using WAI-ARIA in HTML"
http://www.w3.org/TR/aria-in-html/
says in clause2.5 (Add ARIA inline or via script?) that ARIA attributes
should be added via scripting, not as "inline" (as attributes in HTML
tags), except when
a) the attribute "does not rely on scripting to provide interaction
behaviour" or
b) "the content and interaction is only supported in a scripting enabled
browsing context",
in which cases "it is safe" to include them inline.

This looks rather mysterious: what would constitute use that does not
fall into either of these categories? If an ARIA attribute expresses a
relationship that is independent of scripting, a) applues. If it
expresses a relationship created by scripting, b) applies.

Does the clause mean that some cases might be interpreted so that an
ARIA attribute could be independent of scripting but actually isn't?

Please provide some example(s) of cases a) and b) and especially other
cases.

-- 
Yucca, http://www.cs.tut.fi/~jkorpela/

Received on Tuesday, 28 May 2013 20:07:20 UTC