W3C home > Mailing lists > Public > public-html@w3.org > December 2011

Re: HTML Canvas 2D Context Extensions - for review

From: Richard Schwerdtfeger <schwer@us.ibm.com>
Date: Sun, 18 Dec 2011 16:49:27 -0600
To: Benjamin Hawkes-Lewis <bhawkeslewis@googlemail.com>
Cc: Steve Faulkner <faulkner.steve@gmail.com>, HTMLWG WG <public-html@w3.org>, HTML Accessibility Task Force <public-html-a11y@w3.org>
Message-ID: <OF052BA60D.8387FC67-ON8625796A.007C47B7-8625796A.007D6026@us.ibm.com>



Benjamin Hawkes-Lewis <bhawkeslewis@googlemail.com> wrote on 12/18/2011
12:23:55 PM:

> From: Benjamin Hawkes-Lewis <bhawkeslewis@googlemail.com>
> To: Richard Schwerdtfeger/Austin/IBM@IBMUS,
> Cc: Steve Faulkner <faulkner.steve@gmail.com>, HTMLWG WG <public-
> html@w3.org>, HTML Accessibility Task Force <public-html-a11y@w3.org>
> Date: 12/18/2011 12:24 PM
> Subject: Re: HTML Canvas 2D Context Extensions - for review
>
> On Sun, Dec 18, 2011 at 5:41 PM, Richard Schwerdtfeger
> <schwer@us.ibm.com> wrote:
> > If we have the ability to apply bounds to objects in canvas (the
> hit testing API extensions) I could live with what Ian has for
> drawSystemFocusRing and drawCustomFocusRing with some tweeks. I mean
> it is mostly the Same drawFocusRing divided into two separate APIs.
> One change would be to remove the step of observing systems settings
> for focus ring style of a custom focus ring. That makes no sense. If
> an author wants to create a custom focus ring and not follow system
> conventions then why have the step in a custom focus ring?
>
> Rich, you're misreading Ian's text here.
>
> Ian's trying to ensure that authors can easily replace default focus
> rings with their own drawn rings, they can, but if the user has some
> sort of special focus requirements (such as high-contrast focus rings)
> these are honoured.
>
> Authors are poorly placed to create focus rings matching the user's
> special requirements. This is why, with CSS, authors can override
> :focus styles, and users can override them back. If authors draw their
> own rings when users have special requirement, users will lose that
> control in the case of <canvas> content.
>
Hi Ben,

OK but those user supplied style sheets do not inherit system settings. All
the CSS system settings were dropped from CSS 3 due to platform
inconsistencies. Also, users have stopped creating their own style sheets,
in general, as due to the use of absolute positioning, etc. custom user
style sheets can get people into trouble - although not necessarily for
focus rings. I would not want to apply a custom user style sheet on top of
Google+, Facebook, Lotus Connections, or Flickr.

> Contrast Step 2 for the two methods carefully:
>
> drawSystemFocusRing: "If the user has requested the use of particular
> focus rings (e.g. high-contrast focus rings), or if the element would
> have a focus ring drawn around it, then draw a focus ring of the
> appropriate style along the path, following platform conventions, and
> abort these steps."
>

> drawCustomFocusRing: "If the user has requested the use of particular
> focus rings (e.g. high-contrast focus rings), then draw a focus ring
> of the appropriate style along the path, return false, and abort these
> steps."
>
> If you just want to let the system draw a focus ring, use
drawSystemFocusRing.
>
> If you want to draw a custom focus ring, use drawCustomFocusRing but
> check its return value is true before manually drawing your ring. If
> the user has special focus ring requirements, the system should draw
> the ring, the method should return false, and the author should not go
> on to draw the ring.
>
What happens if the ring is a combination of ellipses and stars around it?
Are you going to pick up the high contrast settings for the stars? I
understand your point but I don't think the solution is complete for custom
focus rings. So, if an author needed to draw one they are not going to
follow conventions. Also, the convention for high contrast might be a solid
black line and if you have a black background you may not see it.

I am not saying that Ian's intent is not admirable here. I am simply saying
that I don't think the extra step will always deliver the desired result so
should we require it to be there?

> See this code example for how it would be used in practice:
>
>
http://dev.w3.org/html5/2dcontext/Overview.html#drawCustomFocusRingExample
>
> --
> Benjamin Hawkes-Lewis
>
>
> --
> Benjamin Hawkes-Lewis
>
Received on Sunday, 18 December 2011 22:50:27 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:39:29 UTC