[whatwg] Outline style to use for drawSystemFocusRing

Rik Cabanier cabanier at gmail.com
Mon Jul 29 19:51:31 PDT 2013

On Mon, Jul 29, 2013 at 5:26 PM, Ian Hickson <ian at hixie.ch> wrote:

> On Mon, 29 Jul 2013, Rik Cabanier wrote:
> >
> > Does that mean it should be stroked along the path?
> That depends on the platform. Some platforms render the focus as a
> highlight, some as a dotted line around the exact path of the control,
> some as a box around the bounding box of the focused control, etc.
> The idea of this API is to let the user agent render the focus ring
> however it is appropriate for the platform.

I see. So the user agent can decided if it closes the path, use end caps,
round joins, etc.
Maybe the spec should be more specific and say that nothing in the graphics
state (except clipping) should affect the focus ring.

> > How is the focus ring usually calculated? Does the UA know about the
> > shape of the focused objects and then draws a box around it?
> It depends on the platform.
> > As for the color of the focus ring, shouldn't it come from the ':focus'
> > style of the element that is passed in?
> It should come from the platform.

Why not the style of the element? If the child element has a class of
'button' and the CSS has

button:focus {



Shouldn't the focus be in red?

> See also this recent discussion:
> http://lists.w3.org/Archives/Public/public-whatwg-archive/2013Jul/0345.html

Yes, we're still in that thread :-)

More information about the whatwg mailing list