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

Steve Faulkner faulkner.steve at gmail.com
Thu Jul 26 01:20:04 PDT 2012


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



More information about the whatwg mailing list