The native confirmation dialogs let you press enter to immediately confirm, but more importantly, one of the buttons auto-focuses, and you can immediately tab between those buttons.
Would be nice for the UIKit confirmation dialog to have similar awesome keyboard support. At the very least, they should be immediately tab-able (I know this means low tabindex but I'm a noob beyond that, sorry). It'd be nice if we could optionally specify which button should have auto-focus.
Great work on UIKit otherwise -- love it!
Remembered one more -- supporting Esc would be nice on closable dialogs (and maybe also for canceling confirmation dialogs).
Added: `Confirmation` focus on "ok" when shown. Closes #34
Nice, thanks, this is better. Mind keeping this issue open to add Esc support too for cancel and closable dialogs too?
Also, this is minor and nitpicky, but it'd be nice if pressing tab just cycled between the dialog buttons and didn't go to the other links on the page. I'm not sure if that's possible though. Any idea?
separate issue for that.
that's more of a usability thing, you dont really want to restrict that, you should be able to get anywhere with the keyboard
Ok, made a separate issue for Esc. Thanks.
Re: getting anywhere w/ keyboard -- I meant for overlay dialogs. There, you're covering the rest of the page anyway, so can't access stuff w/ the mouse. Fair to assume a good default design there would be to keep the keyboard focus in the dialog also? (This might be a moot point; might not be possible.)
I wouldn't bother with it personally, your average user doesn't know you can shift-tab etc anyway
Fair enough. =D Supporting enter/space is already a big win, and supporting Esc would cover the cancel case.