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

Dominic Mazzoni <dmazzoni@google.com> writes:

> First a high-level thought.
>
> I'm happy to keep chasing after "legitimate" use-cases instead of contrived
> ones, but just because we can't think of one, doesn't mean it doesn't
> exist. As Alan Perlis said, "Every program has (at least) two purposes: the
> one for which it was written and another for which it wasn't. Maybe the
> vast majority of web apps that use canvas for a grid, or a slider, or a
> list box would be better off using standard html5 objects. But what if
> there's one app that can't, for some reason we haven't anticipated? If we
> wait until that app appears to allow that control to have a hit region,
> then it will be months or years before that app can be accessible.
>
> More below:
>
> On Tue, Feb 18, 2014 at 1:16 PM, Ian Hickson <ian@hixie.ch> wrote:
>
>> On Tue, 18 Feb 2014, Dominic Mazzoni wrote:
>> > On Tue, Feb 18, 2014 at 10:51 AM, Ian Hickson <ian@hixie.ch> wrote:
>> > > >
>> > > > I'm curious if it's possible to implement an accessible list box or
>> > > > other select control in a canvas. Wouldn't it be possible to make it
>> > > > accessible if the canvas lets you focus the list box by clicking on
>> > > > its hit region, and then change the selection using the arrow keys?
>> > >
>> > > What's the concrete use case?
>> >
>> > How can I get more concrete than there's a list box inside a canvas?
>>
>> Well for example, is the use case one of the controls on Bugzilla's
>> advanced search page?:
>>
>>    https://www.w3.org/Bugs/Public/query.cgi?format=advanced
>>
>> If so, I feel comfortable saying that we don't need to make <canvas>
>> support that, since that use case is already handled very well by the
>> <select> element.
>>
>
> As I argued above, maybe we can't come up with a really good use-case, but
> that doesn't mean one doesn't exist.

Absence of evidence is at least weak evidence of absence.
Quote <http://rationalwiki.org/wiki/Absence_of_evidence>:

You hear some rustling noises in your backyard, and you want to figure
out if the noises were caused by your neighbor's dog or by some other
intruder. Fortunately, you know what your neighbor's dog is like - he's
rambunctious and he barks constantly. So you listen closely, and after
20 minutes you don't hear any barking. What should you conclude?

> I'll try, though: what if I had a list of choices displayed as a pie chart?
> Each slice of the pie is a focusable object that, when you click on it,
> allows you to take an action on that pie slice.

What if I look at that page in a textual user agent?

> Surely you'd agree that rendering a pie chart is a natural use-case for the
> canvas element.

Nope. If it is just decoration, you should use CSS. Look at source code:
<http://daten.dieweltistgarnichtso.net/src/css-pie-chart-form.html>

(For pages like these, I have a hotkey for “disable CSS”.)

> I know it's technically possible in css, but it's quite
> tricky - whereas it's simple and natural in canvas. And there are plenty of
> shapes that are basically impossible in pure CSS.

I might consider that a good thing. May I ask if you have designed
human-computer interfaces. If so, may you provide examples?

>> > What if I do want a <select>, but I just want a canvas to render it
>> > visually?
>>
>> Are Web Components and CSS unable to get the effects you need? Maybe we
>> should be improving those rather than <canvas>. It's hard to tell without
>> knowing precisely what you want to do.

This requests reminds me of customers wanting “page intro in flash.”.

>> If a region has a car theft problem, you don't solve it by giving all the
>> thieves the car keys. You solve it by improving the economy so that
>> thieves have better things to do (like get an interesting job), and you
>> solve the remainder by improving law enforcement. The same applies here.
>> We solve it by providing better tools for custom text editing controls
>> (e.g. better contenteditable APIs), and by making it non-conforming to
>> abuse <canvas> for this purpose.
>>
>
> I'd suggest a different analogy: suppose your company makes foam pipe
> insulation and you discover people are buying your product and using it as
> a swimming pool flotation device. Do you try to stop them from using your
> product and try to get them to purchase other pool toys, or do you start
> selling your pipe insulation directly to the sporting goods stores?

You might check if the pipe insulation is toxic, first.

-- 
Nils Dagsson Moskopp // erlehmann
<http://dieweltistgarnichtso.net>

Received on Thursday, 20 February 2014 21:39:08 UTC