W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2014

Re: [whatwg] hit regions: limited set of elements for fallback content

From: Ian Hickson <ian@hixie.ch>
Date: Tue, 18 Feb 2014 07:02:42 +0000 (UTC)
To: Dominic Mazzoni <dmazzoni@google.com>
Message-ID: <alpine.DEB.2.00.1402180649500.31525@ps20323.dreamhostps.com>
Cc: "whatwg@whatwg.org" <whatwg@whatwg.org>, Rik Cabanier <cabanier@gmail.com>
On Mon, 17 Feb 2014, Dominic Mazzoni wrote:
> On Mon, Feb 17, 2014 at 8:20 PM, Ian Hickson <ian@hixie.ch> wrote:
> > 
> > If there are specific use cases that can't be done given the current 
> > restrictions, please let me know;
> 
> What about <select>?

What about it?


> What about an element with a tabindex and an ARIA role that corresponds 
> to a control?

Can you elaborate?


> Note that there are a few ARIA roles for interactive controls that don't 
> have matching HTML counterparts, like gridcell, menuitem, or spinbutton.

Sure. addHitRegion() supports roles like menuitem this in two ways: If 
you're doing something like a straight-forward menu item, you can just add 
the text and the role directly. If you're doing something more elaborate 
(e.g. a menu with disabled items), you can add appropriate elements (e.g. 
<button>) representing the menu into the <canvas> fallback content, and 
use ARIA roles and properties to override <button>'s defaults.

Once you get to more elaborate compound controls like spin buttons, you 
really shouldn't be using <canvas> in the first place, and so those aren't 
supported (spinbutton in particular would be impossible to correctly 
support in a canvas, since it's a compound control with multiple 
subregions, all corresponding to a single DOM node on the ARIA side).

Simple grids are supported the same way that simple menuitems are 
supported; again, though, once you get to elaborate grids with cells that 
can be marked invalid, marked as having popups, etc, you really shouldn't 
be using <canvas>, so those aren't supported. That's what <table> is for. 
If you want a table with graphics inside, the way to do that is to have a 
<table> with each <td> containing a <canvas>, not a single <canvas>. This 
is relatively important because users really don't want authors 
reimplementing table navigation themselves -- indeed I'm not even sure 
it's technically possible for an author to track the AT focus as the user 
navigates a table using AT commands, so it would be incredibly difficult 
for an author to do a good reimplementation of a grid on canvas.

If there are specific use cases for why you'd want to recreate a table 
using <canvas>, please do describe it. If we need to support this, then we 
should make sure we do a good job (as noted, the current APIs aren't 
sufficient, even if we just make addHitRegion() support pointing to <td> 
elements in the canvas fallback content).

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Tuesday, 18 February 2014 07:03:47 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:16 UTC