[whatwg] Drag and drop - keyboard support

Ian Hickson ian at hixie.ch
Wed Jul 15 16:07:45 PDT 2009


On Wed, 15 Jul 2009, Remy Sharp wrote:
> 
> I've been running quite a few tests with the Drag and Drop API, and more 
> recently I was looking at creating an accessible demo of DnD.
> 
> Plugging ARIA support wasn't a problem, but keyboard support was a no 
> goer.
> 
> I tried triggering the dragstart event from the keyboard - which was 
> fine, except that I couldn't get the dataTransfer object in there (it 
> was null), so it meant the whole drag operation couldn't be triggered 
> from the keyboard.
> 
> Unless I'm missing something, keyboard accessibility has been overlooked 
> for DnD.

The drag-and-drop model described in the HTML5 spec is input-device- 
agnostic. If implementations don't support keyboard drag-and-drop (e.g. 
copy-and-paste) then you should bring this up with the relevant vendors.


> I wondered if a copy and paste operation via the keyboard could be used 
> to solve the keyboard DnD issue - in that coping on the :active element 
> would trigger the dragstart event, and pasting from the keyboard could 
> trigger the drop event on the current active element (that the user 
> would tab to) (this idea was entirely inspired by Aron's post).

It's more or less what the spec says about copy-and-paste:

   http://www.whatwg.org/specs/web-apps/current-work/#copy-and-paste

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'


More information about the whatwg mailing list