- From: Martin Kliehm <martin.kliehm@namics.com>
- Date: Thu, 16 Sep 2010 22:01:35 +0200
- To: public-html-a11y@w3.org
- CC: "Gregory J. Rosmaita" <oedipus@hicom.net>, gez.lemon@gmail.com
On 14.09.2010 20:55, Gregory J. Rosmaita wrote: > based on my review of the list archives and past minutes, i think that > the drag and drop issue can be summarized as follows: > > PROBLEM: HTML5 drag and drop is not accessible > > SOLUTION: > > To make drag and drop accessible, HTML5 must: > > * first adequately define what can be achieved via copy and paste using > drag and drop; > > * define a copy and paste API in order to make drag and drop accessible; > if that is not a viable solution, then the HTML5 drag and drop API MUST > be amended to allow the workflow suggested for drag and drop in the > WAI-ARIA Authoring Practices document: > > http://www.w3.org/TR/wai-aria-practices/#dragdrop > > --- END PROPOSED TEXT --- > > this is the solution that gez suggested the HTML5 A11y Task Force > consider, since there is no longer a "copy and paste API" in the > HTML5 specification, and since the only mention of copy and paste > found in dev.w3.org/html5 is an example included in the > introduction to the MENU element: > > http://dev.w3.org/html5/spec/interactive-elements.html#menus-intro > > which illustrates how to use the MENU element to create a toolbar > styled as buttons with drop-down menues, in which the "Edit" button > contains a "Copy" and a "Paste" item, controlled by javascript This is a very reasonable solution that doesn't impose much work on the Task Force by referring an existing documentation. I'd support it. To fully understand the issue I did a little research that I'd like to share with you: A year ago there used to be a copy & paste API [1] in HTML5 right after the drag & drop definition.[2] Apparently it's been removed by the editor. Gez Lemon's example [3] for keyboard accessible drag and drop implements the drag & drop ARIA best practices [4], eventually creating a <menu> for keyboard access plus adding tabindex as well as aria-grabbed and aria-dropeffect values. This is the best example yet and suggests that native support in browsers should work like this. Remy Sharp tried to reproduce Gez' work [5], but the copy & paste API is as yet unsupported by browsers as it is not in the spec. He filed bugs with Mozilla [6] and WebKit [7]. Mozilla rejected the report because the API isn't in the spec any longer, Apple never replied. Meanwhile the WHAT WG version doesn't list copy & paste either, but has it listed under "feature - awaiting more stable implementations".[8] The historical basis for drag & drop is described in a MSDN document [9], although Ian Hickson found several inconsistencies in 2005 when trying to reverse engineer the API.[10] It's noteworthy Hixie wrote that mouse and key events do not seem to be dispatched during drag & drop which implicates that keyboard accessible drag & drop cannot use the drag & drop API at all. While Peter-Paul Koch [11] criticizes the large (7) number of events, the default behavior that an element CANNOT be dropped, inconsistent naming of events, inconsistent implementation in IE8, and an additional CSS attribute in Safari (-khtml-user-drag) violating the paradigm of separation of presentation (CSS) and behavior, other authors applause the API design.[12, 13] Perhaps the event model isn't that bad after all, although it could be improved. Still a copy & paste API implemented by browser vendors imitating Gez' experiment would be preferable since it takes the burden from individual JavaScript authors, ensuring consistent keyboard support among different websites and browsers. Cheers, Martin Further reading: [1] http://dev.w3.org/html5/spec/Overview.html#copy-and-paste [2] http://dev.w3.org/html5/spec/dnd.html [3] http://dev.opera.com/articles/view/accessible-drag-and-drop/ [4] http://www.w3.org/WAI/PF/aria-practices/#dragdrop [5] http://html5doctor.com/accessibility-native-drag-and-drop/ [6] https://bugzilla.mozilla.org/show_bug.cgi?id=504533 [7] https://bugs.webkit.org/show_bug.cgi?id=27339 [8] http://www.whatwg.org/issues/ [9] http://msdn.microsoft.com/en-us/library/ms537658%28VS.85%29.aspx [10] http://ln.hixie.ch/?start=1115899732 [11] http://www.quirksmode.org/blog/archives/2009/09/the_html5_drag.html [12] http://decafbad.com/blog/2009/07/15/html5-drag-and-drop [13] https://developer.mozilla.org/En/DragDrop/Drag_and_Drop
Received on Thursday, 16 September 2010 20:02:06 UTC