Re: hit testing and retained graphics



Rich Schwerdtfeger
CTO Accessibility Software Group

public-html-a11y-request@w3.org wrote on 06/27/2011 06:20:44 AM:

> From: "Charles McCathieNevile" <chaals@opera.com>
> To: Richard Schwerdtfeger/Austin/IBM@IBMUS, "Tab Atkins Jr."
> <jackalmage@gmail.com>
> Cc: "Cameron McCormack" <cam@mcc.id.au>, "Charles Pritchard"
> <chuck@jumis.com>, "Cynthia Shelly" <cyns@microsoft.com>,
> david.bolter@gmail.com, "Frank Olivier"
> <Frank.Olivier@microsoft.com>, Mike@w3.org, public-canvas-
> api@w3.org, public-html@w3.org, public-html-a11y@w3.org
> Date: 06/27/2011 06:22 AM
> Subject: Re: hit testing and retained graphics
> Sent by: public-html-a11y-request@w3.org
>
> On Thu, 23 Jun 2011 22:28:32 +0200, Tab Atkins Jr. <jackalmage@gmail.com>

> wrote:
>
> > On Thu, Jun 23, 2011 at 12:56 PM, Richard Schwerdtfeger
> > <schwer@us.ibm.com> wrote:
> >>> So normally, I imagine, hit testing would be done either by using
> >>> isPointInPath() or by custom code looking at a mouse event’s x/y
> >>> values.
> >>> I think this proposal doesn’t work with isPointInPath(), though, is
> >>> that
> >>> right?
> >>>
> >> I think it would but we would need to incorporate Z order and a notion

> >> of the last drawn element to compute which element is on top. The user

> >> agent would need to manage this.
> >
> > You are attempting to recreate a retained-mode API in an
> > immediate-mode API.  Why is "use SVG" not sufficient for this?
>
> Because people don't - they use canvas instead. If that were not the
case,
> the whole effort to specify canvas would be solving a theoretical
problem.
>

So, one of the main reasons that developers use canvas is because it is
close to the type of API you see in Windows GDI and has been around since
before 1990. SVG, while having many benefits will take a long time to be
adopted by the development community in mass. Meanwhile, canvas will be
used by developers. When a cross-platform 2D API was created for the Web it
was like a boom for developers. This is what they are used to. Once the cat
is let out of the bag you can't stop developers from using it. It is
supported in all the browsers. However, now the fact that it is attached to
HTML and the runway is shortening to make it accessible we have the
JavaScript accessibility problem. It will create a huge black eye on HTML
as it is inaccessible. It's use will now need to be prohibited for
governments much the same way that JavaScript was prohibited for years. The
difference being we know how to fix it and could do something about it
before the problem gets worse.

If SVG is going to be successful it can do so on its own merits and I will
work with the SVG working group to make it accessible too but not until
after we finish HTML 5 and ARIA 1.0. I will also work with browser
developers to promote it once it is accessible.

Jon Ferraiolo and Kelvin Lawrence work with me at IBM and they are some of
the original SVG developers. I want it to succeed too. However, leaving
canvas inaccessible or leaving it without basic hit testing support is not
the solution.

> Given that there is canvas content, and that it is often interactive, you

> can make it possible to make it accessible, or tell people "you better
> hope that somebody bothers to make an equivalent version in a different
> technology". The former is hard work, and only likely to happen in a very

> few cases. The latter is much harder, and only likely to happen in a
small
> fraction of the cases it would be done for the former.
>
> cheers
>
> Chaals
>
> --
> Charles McCathieNevile  Opera Software, Standards Group
>      je parle français -- hablo español -- jeg lærer norsk
> http://my.opera.com/chaals       Try Opera: http://www.opera.com

>

Received on Monday, 27 June 2011 12:42:12 UTC