- From: Ian Hickson <ian@hixie.ch>
- Date: Fri, 21 Feb 2014 17:17:36 +0000 (UTC)
- To: whatwg <whatwg@lists.whatwg.org>
On Fri, 21 Feb 2014, Steve Faulkner wrote: > >> But there's plenty of things which make zero sense as fallback content. >> <input type=color>, for example, simply cannot be sanely implemented in >> canvas > > as implemented input type=color is a button that when activated pops up > a picker dialog. Only on some platforms. > So the following code (as a simple example) > > <canvas id="myCanvas" width="200" height="100" > style="border:1px solid #000000;" > onclick="document.getElementById('button').click();"> > <input type="color"" id="button"> > </canvas> > > in Firefox 30/windows when the canvas is clicked the color picker is > displayed. likewise if the the input receives focus via the keyboard and > the enter/spacebar key is pressed the picker dialog is displayed. -- And that's great if you happen to have that exact implementation. But what about implementations where a colour palette drops down or is shown inline? On Fri, 21 Feb 2014, Charles McCathie Nevile wrote: > > I don't want to pronounce on sanity, but I don't think it has ever been > a major criterion for whether people *will* do something on the Web. Sure. What we're talking about here is just how to guide people into what is more sane. This is a big part of what language design, especially opinionated language design, is all about. > And it seems pretty easy to make a colour picker in canvas. I can > imagine that anyone who wanted a specific-purpose color picker (styled > to match the site, or customising the options, or...) would do it in > canvas or SVG, and my guess is the former would be more common... Building a colour picked in canvas would be easy. Making it accessible using a backing logic based on radio buttons, a list box, or regular buttons, would be easy. Making it acessible based on <input type=color> would not work at all. -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
Received on Friday, 21 February 2014 17:18:45 UTC