Re: drawSystemFocusRing implementation details

Charles,

To my knowledge the browser draws the focus ring for all focused elements
and not the operating system. This is also why authors are able to replace
the outline text style for focused items. This is essentially DOM focus.
So, I don't believe the WhatWG spec. is correct.

Rich


Rich Schwerdtfeger

Charles Pritchard <chuck@jumis.com> wrote on 08/16/2013 10:40:38 AM:

> From: Charles Pritchard <chuck@jumis.com>
> To: public-canvas-api@w3.org,
> Date: 08/16/2013 10:41 AM
> Subject: drawSystemFocusRing implementation details
>
> Recently (off-list) I had a discussion about the implementation of
> drawSystemFocusRing.
>
> It was my understanding that system generated focus rings would be
> managed by the system, laid atop the Canvas element.
> This is in contrast to a  custom focus ring that the author draws and
> manages on their own Canvas bitmap (while still notifying the system).
>
> The current WHATWG spec suggests that drawSystemFocusRing should have
> the system draw a focus ring directly onto the Canvas bitmap.
> The W3C spec does not specify, it simply says to "draw" the focus ring.
>
> My thinking is that drawSystemFocusRing should be as easy for authors to
> use as:
> element.onfocus = function(e) { ctx.drawSystemFocusRing(e.target); };
>
> That's in contrast to a custom focus ring:
> element.onfocus = function(e) { if(ctx.drawCustomFocusRing(e.target))
> ctx.stroke(); };
> element.onblur = function() { myCustomRedrawMethod(); };
>
> Rik, do you have any thoughts on this?
>
> -Charles
>

Received on Friday, 16 August 2013 17:14:52 UTC