Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alert component - click area size for touch devices #20013

Closed
stevenbriscoeca opened this issue Jun 1, 2016 · 4 comments
Closed

Alert component - click area size for touch devices #20013

stevenbriscoeca opened this issue Jun 1, 2016 · 4 comments

Comments

@stevenbriscoeca
Copy link

stevenbriscoeca commented Jun 1, 2016

Hello,

I noticed in the alerts component with the "x" you guys put 14px by 24px size.

When the recommend size by Apple’s iPhone Human Interface Guidelines is 44px by 44px for touch interfaces. I know this is not an IOS app, but people will be viewing bootstrap from a web browser on devices.
Source : https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/LayoutandAppearance.html#//apple_ref/doc/uid/TP40006556-CH54-SW1

I was wondering why did you not put it 44px by 44px and is this something you plan to change in the future.

Thank you

@patrickhlauke
Copy link
Member

why did you not put it 44px by 44px

believe it or not, sometimes things aren't done on purpose ;)

while i believe 44x44px may be a tad on the excessive side in terms of size, i'd agree that the actual active/touch target size could be increased a bit (particularly horizontally)

@patriciamarchand
Copy link

What do you have in mind? Enlarge only the target area or enlarge the image?

@LarryAzevedo
Copy link

LarryAzevedo commented Sep 19, 2016

I would suggest changing the output from:

.alert-dismissible .close { color: inherit; position: relative; right: -1rem; top: -0.125rem; }

to:

.alert-dismissible .close { color: inherit; position: relative; right: -2rem; top: -1rem; padding: 1rem; }

Here's a before and after screenshot (see below). The thin red dotted box represents the clickable/touchable area.
current suggestion

@rwaltenberg
Copy link
Contributor

Sent a pull request with @LarryAzevedo's solution (#21112)

mdo added a commit that referenced this issue Nov 28, 2016
Add padding to dismiss button for alerts and use position to place it. Removes extra padding on .alert-dismissible's right side, too. We could probably further simplify these things in the future as well.
mdo added a commit that referenced this issue Nov 28, 2016
Add padding to dismiss button for alerts and use position to place it. Removes extra padding on .alert-dismissible's right side, too. We could probably further simplify these things in the future as well.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants