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

Re: [whatwg] Outline style to use for drawSystemFocusRing

From: Dominic Mazzoni <dmazzoni@google.com>
Date: Thu, 12 Sep 2013 09:32:00 -0700
Message-ID: <CAFz-FYwi6tQ7WcODc3MBC=6pM_=G5ZONe=nVSHLs5EGTiUjE=w@mail.gmail.com>
To: Ian Hickson <ian@hixie.ch>
Cc: whatwg@whatwg.org
On Wed, Sep 11, 2013 at 5:54 PM, Ian Hickson <ian@hixie.ch> wrote:

> On Tue, 10 Sep 2013, Dominic Mazzoni wrote:
> >
> > We've finished implementing drawSystemFocusRing and drawCustomFocusRing
> > in Chrome. Try it in Chrome 31 or higher (either canary or dev channel
> > should work today). You'll need to go to chrome://flags and enable
> > *experimental canvas features*, then restart the browser.
> >
> > Here's a demo I built that uses drawSystemFocusRing:
> > http://dmazzoni-google.github.io/canvas-focus-ring-demo/
>
> Looks good. Was your conclusion that the spec was ok as is, or did you
> deviate from the spec in some way that needs a spec change
>

I think drawSystemFocusRing is good to go. If you want, you can update the
spec to reflect that an implementation is available (behind a flag).

Only one minor issue for clarification: if the current path is a line or
unclosed polygon, should it be closed (or otherwise outlined) when drawing
the focus ring? Currently we're not doing so in Chrome, but it might help
to clarify. For example, if the path is a line, what's drawn is just an
additional stroke on that line, not a "ring".

I'm not as sure about drawCustomFocusRing. The spec says "If the user has
requested the use of particular focus rings", but I'm not aware of any
platform API we could use to query that. To the best of my knowledge,
assistive technology that draws its own focus rings, like ZoomText,
normally draws an additional focus ring with extra padding, rather than
replacing the system one. (Example:
http://www.aisquared.com/zoomtext/tour/enhancements#focus_enhancements)

So, I'm not sure how I'd implement that part of the spec. Chrome definitely
has no plans to give users an additional preference for focus rings as a
browser setting.

So, what we implemented in Chrome for drawCustomFocusRing is basically just
a function that notifies assistive technology of the bounding rect of the
focused region within the canvas. It's still useful, but if that's all it
does, then drawCustomFocusRing is a poor name. Perhaps it should be called
something like notifyFocusLocation or something like that.

- Dominic
Received on Thursday, 12 September 2013 16:32:25 UTC

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