Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
min-height for HTML form's submit buttons from a web accessibility standpoint
I am styling a simple HTML-PHP-CSS contact form and I have considered to give some min-height
pixel value CSS style to the form's submit button.
I ran a Google search with the query:
min-height submit button accessibility
None of the 10 articles in the first place dealt with this directly (standard) nor did it include details about min-height
(as a CSS property) and submit buttons.
Is there a worldly accessibility min-height
standard (pixel or otherwise) for submit buttons in forms?
1 answer
There is no universal accessibility standard for how tall your buttons should be. Consider that when you're using a simple link, users have to click on the text itself to follow the link; as long as your text size isn't ridiculously small there's no problem with that. Don't make your buttons smaller than that.
That said, min-height
is generally the wrong CSS property to use for this. Make sure your text size is appropriate, then add some padding and/or margin until your button is the size you want it. You don't need to specify a min-height, because the combination of text size + padding does that for you.
0 comment threads