Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

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

Closed
aseemk opened this Issue · 6 comments

2 participants

@aseemk

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

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

@tj tj closed this in 8ce09f1
@aseemk

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?

@tj
Owner
tj commented

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

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

@tj
Owner
tj commented

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

@aseemk

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
Something went wrong with that request. Please try again.