W3C home > Mailing lists > Public > public-pfwg@w3.org > October 2014

Re: Element.getComputedRole()

From: Alexander Surkov <surkov.alexander@gmail.com>
Date: Thu, 16 Oct 2014 18:53:33 -0400
Message-ID: <CA+epNsc6rspb6+V1909pKE6=Ob3B0USC-MO14E76aucLhMHngA@mail.gmail.com>
To: Dominic Mazzoni <dmazzoni@google.com>
Cc: Richard Schwerdtfeger <schwer@us.ibm.com>, PF <public-pfwg@w3.org>
I think DOM Element interface extension is misdesign because of reasons:
1) that is performance issue because of potential misuse and overuse, it's
so easy to hit accessibility properties among other methods on Element;
2) it doesn't make sense to expose accessible properties on every DOM
element (like on inaccessible DOM elements) and Element API approach cannot
be used for accessibles having no DOM elements.
3) it's not extensible as part of Element interface, that means you cannot
reuse on text nodes, on document node, on JS accessible trees if they are
ever invented.

I would design an Accessible interface instead following the accessibility
desktop APIs.
interface Accessible {
  string role;
};

Then DOM Window object can be extended by:
interface Window {
  Accessible getAccessibleFor(Node aNode);
};

Thanks.
Alexander.


On Thu, Oct 16, 2014 at 5:51 PM, Dominic Mazzoni <dmazzoni@google.com>
wrote:

> 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>
> 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 Thursday, 16 October 2014 22:54:00 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:35:33 UTC