[whatwg] Outline style to use for drawSystemFocusRing

Dominic Mazzoni dmazzoni at google.com
Wed Jul 24 16:27:59 PDT 2013


On Wed, Jul 24, 2013 at 4:14 PM, Ian Hickson <ian at hixie.ch> wrote:

> The idea is it's supposed to be the system style (hence the name of the
> method, draw _system_ focus ring), and that if the authors wants a special
> style, they use drawCustomFocusRing() and if it returns true they draw it
> themselves (using strokeStyle and stroke(), or whatever).
>

Every html element already gets a system focus ring by default if you add
tabindex=0 and focus it - however, you can use CSS to change just one
property - like just the color, or just the outline width - while
inheriting everything else from the system style (border radius, line
style, etc). Why not allow for the same flexibility in canvas?

If you want the system focus ring, that's what you get by default when you
call drawSystemFocusRing. If you want to draw something totally unique, use
drawCustomFocusRing. However, you could also have the option of overriding
part of the system focus ring style using the element's outline style.

If that still sounds ridiculous, I'll drop this idea. Thanks.

- Dominic



More information about the whatwg mailing list