W3C home > Mailing lists > Public > public-canvas-api@w3.org > October to December 2011

Re: canvas example

From: Charles Pritchard <chuck@jumis.com>
Date: Thu, 22 Dec 2011 15:00:06 -0800
Message-ID: <4EF3B676.9070201@jumis.com>
To: Jonathan Mcdougall <jonathanmcdougall@gmail.com>
CC: public-canvas-api@w3.org
On 12/22/11 2:44 PM, Jonathan Mcdougall wrote:
> On Thu, Dec 22, 2011 at 2:32 PM, Charles Pritchard<chuck@jumis.com>  wrote:
>> On 12/21/11 6:27 PM, Jonathan Mcdougall wrote:
>>> On Tue, 4 Oct 2011 at 02:44:46, Frank Olivier<Frank.Olivier@microsoft.com>  wrote:
>>>
>>>> This is an odd example, IMO -
>>>> http://canui.sourceforge.net/canui/canui.js  is a huge amount of
>>>> code
>>> I am the author of that library. I was not aware of this discussion
>>> and only found it recently on google. Sorry if I'm a bit late.
>> Jonathan, thank you for posting to the list. We're in need of
>> experienced Canvas developers, your perspective is important.
> I am not really experienced and do not do web development
> professionally. I just played around with it to see what it could do,
> but I'll happily help if I can.

Given that you've built a Canvas ui package, that does say something 
about your experience.

Canvas has not been a web technology for that long. Nor has it been used 
in many professional settings.

Now that it is supported by all major vendors, tablets and smartphones, 
it's reaching a place where there will be more professional uses, often 
in place of Flash. SVG is also gaining broader support.

Most of the Canvas developers I've talked to have written only a few 
applications in Canvas; their time is often spent elsewhere, like many 
programmers, on business flow processing (for whomever they work for). 
Most of them work in C#, and are still hoping for HTML5 to become more 
commonly requested.

It wasn't until these past few months that I started seeing requests for 
HTML5, Canvas and SVG apps.

>> [...] I'd like to work with you toward partial WCAG 2.0 Conformance.
>> That's a big part of what I've been doing on this list: trying to
>> ensure Canvas UI can meet WCAG 2.0 http://www.w3.org/TR/WCAG/
>>
>> You've already done some keyboard events; there are some role=""
>> attributes (already matching what you're using, names like "combobox")
>> and other tweaks that will bring canui closer to conformance.
> Hm, that sounded like indoctrination :).

Absolutely. I am always pushing WCAG. I'm a true believer over here :-)

> I can't help with this for the moment. I wrote previously that I am not
> currently working on that project anymore for various reasons. Bringing
> canui "closer to conformance" does not interest me. However, the code is
> in the public domain.

Yes, it's in the public domain, and so I'm totally free to work on it, 
fork it, share it and send you back patches (which would also be in 
public domain).

I'm a big fan of that license.


>> So for example, with your application, it makes the most sense to have
>> a combobox look like:<canvas role="combobox" tabindex="0"
>> aria-label="select an item"></canvas>
> Although every control can live in its own<canvas>, I never thought of
> using it this way. I was expecting the various controls to be part of a
> larger canvas. One of the difficulties is with floating elements such as
> menus or comboboxes, where the canvas needs to extend past the bounds of
> the control while in a normal state, giving trouble with the flow around
> it.
>

This is a place where ARIA markup is a big help. You might have 
aria-haspopup in addition to role="combobox", and create another canvas 
layer for that popup. That's what we did with our select boxes. That's 
basically how it's programmed in C++ by vendors.

> I'm also not sure what we're talking about here. I'm reading on this
> mailing list about how<canvas>  shouldn't be used to replace native
> controls (which I mostly agree with), but you seem to suggest otherwise.

ARIA was designed in response to developers creating form controls by 
using <div>, <ul> and the like. The same applies for Canvas. I consider 
Canvas to be a presentational technology, much like CSS. They don't 
replace Semantic HTML nor ARIA, they just enhance presentation.

While HTML does have <fieldset>, in a nod to grouping elements, it's 
very different than a component widget.

There is no <spreadsheet> tag, in HTML, for instance. So we have to glue 
a bunch of primitives together.  ARIA is the language of those low level 
primitives.

The reasons for using native controls with only CSS, or enhancing them 
with Canvas, are really up to the individual case. They are certainly a 
lot of work. Application development is a lot of work. Where the web 
typically worked with smaller JS files, then grew to use packages like 
jQuery to help with DOM manipulation, it has now grown to support full 
applications, with Web Apps APIs.  There are hundreds of web apps that 
are over 50k LOC. These projects are quite likely to have developed 
their own widgets outside of simply using HTML forms.

For what it's worth, I also agree with section 4.8.11.1.13 Best 
Practices as published by the WHATWG.

However, if someone is in the business of authoring a text editor, then 
they are not in the target audience for that recommendation. Because, 
the entire point of their software development is the editing of text. 
So the additional work involved is part of their task.

That's very different than an author who is working on some other kind 
of utility, application or content.

-Charles
Received on Thursday, 22 December 2011 23:00:33 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 22 December 2011 23:00:35 GMT