Confirmation dialog: keyboard (enter and tab) support #34

Closed
aseemk opened this Issue Feb 21, 2012 · 6 comments

Comments

Projects
None yet
2 participants

aseemk commented Feb 21, 2012

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!

aseemk commented Feb 22, 2012

Remembered one more -- supporting Esc would be nice on closable dialogs (and maybe also for canceling confirmation dialogs).

@tj tj closed this in 8ce09f1 Feb 22, 2012

aseemk commented Feb 23, 2012

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?

Owner

tj commented Feb 23, 2012

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

aseemk commented Feb 23, 2012

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.)

Owner

tj commented Feb 23, 2012

I wouldn't bother with it personally, your average user doesn't know you can shift-tab etc anyway

aseemk commented Feb 23, 2012

Fair enough. =D Supporting enter/space is already a big win, and supporting Esc would cover the cancel case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment