RE: drawSystemFocusRing and drawCustomFocusRing names are confusing.

I thought the first method name was clear but at this point I would accept
the other name if the browser manufacturers feel they must have that name
instead.

The text in the method clearly states the use of the current default path:

we could:

<change>

"If the given element is focused, and the user has configured his system to
draw focus rings in a particular manner (for example, high contrast focus
rings), draws a focus ring around the current default path or the given
path and returns false"
</change>
<to>
"Sets the location, based on the current default path, for the associated
fallback element and if the given element is focused, draws a ring along
the same path using the style the browser uses for drawing its standard
focus ring."
</to>


Rich

Rich Schwerdtfeger



From: Jatinder Mann <jmann@microsoft.com>
To: "robert@ocallahan.org" <robert@ocallahan.org>, Jay Munro
            <jaymunro@microsoft.com>, Richard
            Schwerdtfeger/Austin/IBM@IBMUS, Alexander Surkov
            <surkov.alexander@gmail.com>, "Rik Cabanier
            (cabanier@adobe.com)" <cabanier@adobe.com>, Dominic Mazzoni
            <dmazzoni@google.com>, "Philippe Le Hegaret (plh@w3.org)"
            <plh@w3.org>, Canvas <public-canvas-api@w3.org>
Date: 01/13/2014 03:57 PM
Subject: RE: drawSystemFocusRing and drawCustomFocusRing names are
            confusing.



On Thurs, Jan 9, 2014 at 1:03 PM, Robert O'Callahan wrote:
> However, if the name ignores the accessibility side effects, we can
expect authors to not set the correct path,
> since a path is not obviously needed. So I suggest we remove the version
of the method that uses the current
> path, forcing authors to provide a Path parameter, and explain in prose
what the Path parameter is for. Of
> course that would mean making this functionality depend on Path, but I
think that's OK. This functionality
> seems less important than drawFocusIfNeeded.

I wonder if it’s worth considering Robert’s suggestion. If the
drawFocusIfNeeded method always must take a path and element as parameters,
the parameters may make it more clear that this method is (A) setting the
fallback element’s accessibility region to the path, and the method name
would make it clear that (B) it is drawing focus if needed. I found that
many folks that I had discussed this API with were initially confused with
how drawSystemFocusRing(element) worked because they didn’t realize the
current path was mapping the accessibility region to the fallback element.
Only specifying a drawFocusIfNeeded(path, element) may make the purpose of
this API more clear.

Jatinder

From: rocallahan@gmail.com [mailto:rocallahan@gmail.com] On Behalf Of
Robert O'Callahan
Sent: Thursday, January 9, 2014 1:03 PM
To: Jay Munro
Cc: Richard Schwerdtfeger; Alexander Surkov; Rik Cabanier
(cabanier@adobe.com); Dominic Mazzoni; Jatinder Mann; Philippe Le Hegaret
(plh@w3.org); Canvas
Subject: Re: drawSystemFocusRing and drawCustomFocusRing names are
confusing.

I agree with jatinder. "drawFocus" suggests that it will always draw
something, but that's wrong. The name "drawCustomFocusRing" is even worse
since it never draws anything.

I think for the method that actually draws, "drawFocusIfNeeded" would be
good.

For the other method, "needToDrawFocus" sounds good for the
non-accessibility functionality. However, if the name ignores the
accessibility side effects, we can expect authors to not set the correct
path, since a path is not obviously needed. So I suggest we remove the
version of the method that uses the current path, forcing authors to
provide a Path parameter, and explain in prose what the Path parameter is
for. Of course that would mean making this functionality depend on Path,
but I think that's OK. This functionality seems less important than
drawFocusIfNeeded. There is the possibility that authors will just supply a
bogus Path anyway because they don't care about accessibility, but that's
possible with any form of this API.
Rob
--
Jtehsauts  tshaei dS,o n" Wohfy  Mdaon  yhoaus  eanuttehrotraiitny  eovni
le atrhtohu gthot sf oirng iyvoeu rs ihnesa.r"t sS?o  Whhei csha iids  teoa
stiheer :p atroa lsyazye,d  'mYaonu,r  "sGients  uapr,e  tfaokreg iyvoeunr,
'm aotr  atnod  sgaoy ,h o'mGee.t"  uTph eann dt hwea lmka'n?  gBoutt  uIp
waanndt  wyeonut  thoo mken.o w

Received on Monday, 13 January 2014 22:49:06 UTC