[whatwg] Outline style to use for drawSystemFocusRing
Rik Cabanier
cabanier at gmail.com
Mon Jul 29 16:34:00 PDT 2013
On Mon, Jul 29, 2013 at 2:48 PM, Ian Hickson <ian at hixie.ch> wrote:
> On Mon, 29 Jul 2013, Rik Cabanier 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).
> > >
> > > There's an example in the spec -- search for "couple of checkboxes".
> >
> > That example doesn't show how the focus rings are supposed to render.
> > The spec says:
> >
> > ... draws a focus ring *around *the current default path or the given
> path
> > ...
>
> Note that that text is non-normative. There's a big box to that effect
> just above the text itself.
>
>
> > and:
> >
> > ... draw a focus ring of the appropriate style along the intended path...
>
> That one is normative.
>
>
> > Which way should it be drawn?
>
> The way the normative one says it is to be drawn.
>
Does that mean it should be stroked along the path?
> > It seems that the focus ring should be around the path and drawn in
> > accordance to the browser's algorithm of focus regions.
>
> Not really should what you're asking. Can you elaborate?
>
>
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?
As for the color of the focus ring, shouldn't it come from the ':focus'
style of the element that is passed in?
More information about the whatwg
mailing list