[webkit-dev] Proposal: Add support for focus rings in Canvas 2d

Mario Sanchez Prada mario.prada at samsung.com
Fri Oct 11 02:02:28 PDT 2013

> [...]
> It seems that for this to be useful for ATs,
> you'd have to iterate every object in your canvas
> and call at least drawCustomFocusRing once. Then
> when the item actually did become focused, you'd
> have to call drawSystemFocusRing. 
> I don't know what others think, but I think
> accessibility work is best done on demand.

I agree, I also believe accessibility works better that way in general.

Yet another good example of that, IMHO, is the fact that we need to make
sure that the render tree is stable (as in not needing updating due to
additions/removals in the tree) before using the accessibility API.
Otherwise we might try to compute information over invalid objects, that
might lead to crashes and other funny things.

> In this case I could imagine something like a
> RectangleRequestEvent be dispatched that the canvas
> could intercept. 
>	The event would have the Element in question
>     as a data member of the Event.
>	The canvas could set the rectangle in the event
>     for that element 
>Then this work would only have to be done when requested

My knowledge of canvas 2D is very limited, but this way of doing thing Chris
is proposing here sounds like a good idea to me, providing it's feasible.


More information about the webkit-dev mailing list