Re: Working Group Decision on ISSUE-131 caret-location-api

On Fri, Apr 29, 2011 at 8:35 AM, Jonas Sicking <jonas@sicking.cc> wrote:
> The current (pre applying WG decision) syntax:
>
> // Example A
> cx.beginPath();
> cx.rect(x,y,w,h);
> cx.drawFocusRing(elem);
>
> This would draw a OS-styled focus ring on the coordinates x,y,w,h as
> well as tell AT that focus is currently located at those coordinates
> as to enable it to magnify that part of the screen if desired.
>
> What I'm proposing is that we enable the following syntax *as well*:
>
> // Example B
> cx.beginPath();
> cx.rect(x,y,w,h);
> cx.drawFocusRing(elem);
> cx.setCaretSelectionRect(elem,x-10,y-10,w+20,h+20);
>
> This would draw the focus ring on the coordinates x,y,w,h but tell AT
> that a somewhat larger area is what needs to be magnified.
>
> However, if someone just writes the code as in example A, it would
> still inform AT that x,y,w,h is the area that should be magnified.

The Decision, and the Change Proposal it draws on, already do this
AFAICT.

Specifically in drawFocusRing():

"2. If supporting an accessibility API, implementors may use the drawing
path to form a best fit rectangle in screen coordinates and apply it to
the bounding rectangle of the associated accessible object."

http://lists.w3.org/Archives/Public/public-html-a11y/2011Apr/att-0129/HTML_Canvas_2DContext20110415.html#dom-context-2d-drawfocusring

Magnifiers use the bounding rectangle in the accessibility API to work
out the area to be magnified.

If I've misunderstood you, can you clarify what changes to the Change
Proposal's text you'd want to see to get the functionality you're
asking for?

--
Benjamin Hawkes-Lewis

Received on Friday, 29 April 2011 08:19:53 UTC