Re: Element.getComputedRole() + Element.getUIBehaviors()

Dominic,

If you know if an element has an event handler of a certain type the evaluation tool can check what other elements can respond to the event due to event bubbling.

Sometimes people will put event handlers on the body element which has the scope of all elements in the document, but still evaluation tools can report the user to perform a manual check and verify the event on the body element is providing the proper keyboard support for a particular ARIA widget.

Without any event information none of these rules can be performed or reported to people using web accessibility evaluation tools.

Jon


From: Dominic Mazzoni <dmazzoni@google.com<mailto:dmazzoni@google.com>>
Date: Wednesday, November 26, 2014 at 11:41 AM
To: Jon Gunderson <jongund@illinois.edu<mailto:jongund@illinois.edu>>
Cc: Richard Schwerdtfeger <schwer@us.ibm.com<mailto:schwer@us.ibm.com>>, "public-pfwg@w3.org<mailto:public-pfwg@w3.org>" <public-pfwg@w3.org<mailto:public-pfwg@w3.org>>
Subject: Re: Element.getComputedRole() + Element.getUIBehaviors()

As before my main concern with this type of function is that it's impossible to implement correctly, and therefore it's quite misleading and of dubious value. Event delegation is an extremely common pattern in web apps, and there's no way to know whether an element is being listened to by an event handler on a different element or not.

On Wed, Nov 26, 2014 at 9:07 AM, Gunderson, Jon R <jongund@illinois.edu<mailto:jongund@illinois.edu>> wrote:
Rich and Dominic,

What do you think about a element method called getUIBehavior()?


interface Element : Node {

  Boolean  getUIBehaviors(in DOMString name);

}

DOMString values:

‘click’ : Returns true if node has at least one event handler for the following events “onclick” or “ondbclick” events

‘keyboard’ : Returns true if node has at least one event handler for the following events “onKeyPress”, “onKeyDown or “onKeyUp” events

‘mouse’ : Returns true if node has at least one event handler for “onMouseXXX” events

‘change’ : Returns true if node has at “onChange” event

“focus”  : Returns  true if node has at “onFocus” event

“blur”  : Returns  true if node has at “onBlur” event

“drag” : Returns true if node has at least one event handler for “onDragXXX” events

“css”  : Returns true if node has at least one event handler for “animationXXX” events or “transitionend” event

From: Dominic Mazzoni <dmazzoni@google.com<mailto:dmazzoni@google.com>>
Date: Thursday, October 16, 2014 at 3:51 PM
To: Richard Schwerdtfeger <schwer@us.ibm.com<mailto:schwer@us.ibm.com>>
Cc: "public-pfwg@w3.org<mailto:public-pfwg@w3.org>" <public-pfwg@w3.org<mailto:public-pfwg@w3.org>>
Subject: Re: Element.getComputedRole()
Resent-From: "public-pfwg@w3.org<mailto:public-pfwg@w3.org>" <public-pfwg@w3.org<mailto:public-pfwg@w3.org>>
Resent-Date: Thursday, October 16, 2014 at 3:52 PM

Sure, I think it's a good idea.

How about getComputedAccessibleText next?

In both Blink and WebKit I imagine we'll have to think about efficiency when implementing this - typically we enable accessibility lazily and then leave it on - at least for that page. We'd want to use the real accessibility code to compute this, but then disable accessibility support and clean up if it wasn't enabled previously.


On Thu, Oct 16, 2014 at 1:19 PM, Richard Schwerdtfeger <schwer@us.ibm.com<mailto:schwer@us.ibm.com>> wrote:

Hi Dominic,

We have an issue to add a getComputedRole() function on  Element. This would help application developers as well as accessibility test tools. Here is the issue:

https://www.w3.org/WAI/PF/Group/track/issues/427

Would you support implementing this feature in Chrome?

Thanks,

Rich




Rich Schwerdtfeger

Received on Wednesday, 26 November 2014 18:05:07 UTC