Re: ARIA mapping of intent

On 1/31/12 11:45 PM, Dominic Cooney wrote:
> Hi Charles,
>
> On Wed, Feb 1, 2012 at 10:25 AM, Charles Pritchard <chuck@jumis.com 
> <mailto:chuck@jumis.com>> wrote:
>
>     This issue just came up for me: how do we let an AT know ahead of
>     time about an Intent which would be triggered by a button? This
>     came up while talking to Benjamin about event forwarding from
>     buttons to file input fields.
>
>
> Could you elaborate on what the AT would use this for?

It's typical for most interactive fields that they carry some semantic 
meaning.

When you navigate through buttons, it says "Button", and then sounds off 
the author supplied text.
Such that: <button>Example</button> will result in the AT saying: 
"button. Example" or "Example. button type".

It'd be nice, in cases where there is an intent, if we could make a 
mapping ahead of time.

I'm using <input type=file> as the archetype of all intents.

It'd be nice to know that the following is going to spawn a file 
selection dialog:
<img onclick="file.click()" alt="Add">

Now, that is of course, bad form. We should provide better alt text, and 
we can certainly provide additional ARIA markup. But even saying "Add a 
file" isn't the whole story.
It's really "Add a file from your browser's file picker".


>     Here's our modern day forwarding, with a non-standard role extension.
>
>     <span role="file button" onclick=file.click() />
>     <input id=file id=file hidden />
>
>
>     That "file" role is not standard. Currently, an AT will just
>     remark that it's a button (though it may read the role out).
>
>     So, in the long term, everything is really an intent.
>
>
> I don’t think everything is an intent; I think intents have a certain 
> granularity which makes some things too fine-grained to be intents 
> (like navigating a link, or selecting some text.) Intents also imply 
> the opportunity for parties being “late bound.” A given site might 
> desire that facility on a case-by-case basis, so similar action that 
> is mediated using intents on one site might be hard-coded and not use 
> intents on another.

I'm not sure where I was going with that. I suppose I'd say that intents 
can augment most elements.

It's an opt-in system, much like the WAI-ARIA role. And there are some 
existing semantics out there, items like <input type=file> being one 
where the UA may mix registered intents with traditional file picker 
behavior.


>     How do we let ATs know that a button is going to trigger a file
>     picker box when clicked on? Do we need an intent="mime/mask"
>     attribute added to the top level of ARIA?
>
>
> Would it make sense to use role extensions depending on the given 
> intent? For example <span role="share button" onclick=…>? Could you 
> point to examples of sites that have accessible roles for things that 
> you’d probably implement using intents? Or is there something special 
> about the intent itself? My gut feeling is that, from the user’s point 
> of view, saying “this button is connected to an intent” is like saying 
> “this button does something using AJAX.” It is kind of an 
> implementation detail.

At it's most basic, that's what we have with button. "This is a button".
It's more than that, though, because the Intent information is 
registered ahead of time, and may be used multiple times in the page.

With Intent added on, we can say, "this is a share button, registered to 
2 applications",
or "this is a file picker button". "There are 4 additional items this 
intent on the page".

That's what I'd want to do for this page:
http://examples.webintents.org/intents/share/share.html
While it's easy enough to just cycle through buttons, if that page had 
more buttons, it'd be nice to cycle through the "share" buttons.

Yes, it does make sense to use role extensions.
The PFWG and/or other accessibility peoples may have some 
recommendations on that.

I would use role="share button" in my own apps, but for standards work, 
I'd want to check with WAI-ARIA editors, and the broader community 
first. For my own apps, I'm free to use standards as loosely as I like.

-Charles

Received on Wednesday, 1 February 2012 08:31:53 UTC