W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2013

Re: [whatwg] Outline style to use for drawSystemFocusRing

From: Rik Cabanier <cabanier@gmail.com>
Date: Mon, 29 Jul 2013 16:34:00 -0700
Message-ID: <CAGN7qDAaq8XnX1z_BbpLVhgE5m4j--b720ZuHSEzq_iN1es0=Q@mail.gmail.com>
To: Ian Hickson <ian@hixie.ch>
Cc: whatwg@lists.whatwg.org, Dominic Mazzoni <dmazzoni@google.com>
On Mon, Jul 29, 2013 at 2:48 PM, Ian Hickson <ian@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?
Received on Monday, 29 July 2013 23:34:26 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:03 UTC