[whatwg] Outline style to use for drawSystemFocusRing

Dominic Mazzoni dmazzoni at google.com
Mon Sep 30 15:31:05 PDT 2013


On Mon, Sep 30, 2013 at 3:21 PM, Rik Cabanier <cabanier at gmail.com> wrote:

> I just checked Windows and they offer the option "Make the focus rectangle
> thicker". I checked IE and it honors that setting.
> It's too bad that we didn't get feedback from them but it does look like
> this is something IE would implement.
>

Yes, and drawSystemFocusRing should respect the thicker focus rectangle.

I don't think that drawCustomFocusRing should switch to the system focus
rectangle style just because that preference was set - it might look
horrible on a particular canvas. Plus, Rich's original argument wasn't
about the "make the focus rectangle thicker", it was about handling Windows
high contrast mode correctly - but again, I still don't think that the
system is going to do a better job at drawing a focus ring on a canvas just
because high contrast mode is on. What we really need is an API for web
developers to know if high contrast mode is on, and that's orthogonal to
canvas.

Here's my alternative idea, though: how about calling it something like
>> scrollFocusedObjectIntoView, and have the *primary* purpose of the API be
>> to make the browser scroll the viewport, if needed to make sure that the
>> bounding box of the path is visible, if that object is focused. The
>> drawFocusRing spec would be modified to specify that scrolling the viewport
>> is part of the spec, too.
>>
>
> That sounds very much like 'scrollPathIntoView'.
> I think that this is changing the API too much.
>

I still don't understand why we're in a situation where we can't change it
too much. If the choice is ship drawCustomFocusRing with flaws or delay it
until the next revision so we can get it right, my vote is firmly for the
latter. I do not support shipping it as-is.

- Dominic



More information about the whatwg mailing list