pjparra / Fast-Confirm

A simple, polite and streamlined way to ask the user for confirmation
http://blog.pierrejeanparra.com/jquery-plugins/fast-confirm
5 stars 3 forks source link

Confirm <div> Surrounded by an Outline. #1

Closed EpicVoyage closed 12 years ago

EpicVoyage commented 12 years ago

For some reason I am getting an outline around Fast Confirm's containing

tag. The solution appears to be the addition of the "outline" parameter circa line 155:

$confirmBox.css({ top: topOffset, left: leftOffset, zIndex: params.zIndex, outline: 'none' }).focus();

pjparra commented 12 years ago

Hi DagaDaga,

The box is outlined because it gains focus when it appears. I coded it this way to allow the use of enter key to confirm and esc key to cancel. The outline property exists for accessibility purposes: a mouseless user is able to know where the focus is when browsing a page with the tab key.

However, I think you're right, this outline makes no sense here: the fact that the confirm box has the focus or not is purely a programming trick the user should not be aware of. So, unless someone tells me this outline could make sense, I'm gonna remove it by using your solution.

Thanks for your contribution!

EpicVoyage commented 12 years ago

The accessibility is great, thanks!