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

Re: [whatwg] can a click event be handled on an unbacked hit region()?

From: Steve Faulkner <faulkner.steve@gmail.com>
Date: Thu, 26 Jul 2012 09:20:04 +0100
Message-ID: <CA+ri+V=n5uL455Lzki+AW=6ZMnppKEBFnF3aM-ubUfKxewTmWw@mail.gmail.com>
To: whatwg <whatwg@whatwg.org>
Hi Ted,

you wrote:

If the hit region has an unbacked region description, click events are
> fired at the canvas element. In this case, the click event's 'region'
> property will contain the ID of the hit region which was clicked.
>

In this case unbacked regions can be used to designate interactive regions,
but the interactivity is confined to mouse based events, as the region is
not associated with a DOM element that can receive focus.


regards
Stevef




> Hi Steve,
>
> You wrote:
>
> > From my reading of the hitregion() [1] section of the spec it is
> > unclear to me whether click events work on unbacked regions
> >
> > It is clear that mouse move events can be used, but will developers be
> > able to detect and make use of click events on backed regions?
> >
> > My guess is yes, which appears to mean that unbacked regions can be
> > used as pseudo interactive controls for mouse or touch events, is that
> > correct?
>
> If the hit region has an element in the fallback content as it's
> control, click events get forwarded to the relevant fallback element.
>
> If the hit region has an unbacked region description, click events are
> fired at the canvas element. In this case, the click event's 'region'
> property will contain the ID of the hit region which was clicked.
>
> Look for the spec text beginning with "The MouseEvent interface is
> extended to support hit regions."
>
>
> Ted
>

-- 
with regards

Steve Faulkner
Technical Director - TPG

www.paciellogroup.com | www.HTML5accessibility.com |
www.twitter.com/stevefaulkner
HTML5: Techniques for providing useful text alternatives -
dev.w3.org/html5/alt-techniques/
Web Accessibility Toolbar -
www.paciellogroup.com/resources/wat-ie-about.html
Received on Thursday, 26 July 2012 08:21:19 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:09 GMT