Improving UX of forms using only HTML

The show/hide password pattern

In the last years, the hide/show button pattern became very popular. But a lot of people use it wrong. The mistake is in choosing the right HTML element.

People think users will interact with an element onl…



The show/hide password pattern

In the last years, the hide/show button pattern became very popular. But a lot of people use it wrong. The mistake is in choosing the right HTML element.

People think users will interact with an element only using a mouse. Just click one time, two, etc. But the value of this pattern is more important.

Firstly, users use the keyboard quickly focusing from the field to the button using the tab key. Then they push the enter key for showing or hiding the password.

Secondly, screen readers have to detect this element is interactive. Then users can use it.

So only one element meets all these requirements — the button element. Use it and your users will be happy to use your interface.



Showing the correct virtual keyboard when you ask to enter a code

If you want to make UX of forms more simple and user-friendly you should right choose the type attribute. That’s important because the attribute helps browsers show the most appropriate virtual keyboard. Thus users can more quickly fill forms. For example, if users fill in a phone number type=”tel” shows the keyboard with digits and other special symbols.

But there are cases when existing values can’t be applied. For example, when you sign in you want to ask users to enter a numeric code.

In these cases, you can use the special inputmode attribute that helps browsers display a correct keyboard as well. In the cases with a numeric code, you should use the numeric value. Then browsers will display the keyboard with digits only and users will fill the field quickly as well as with the type attribute.

P.S.
? If you like this post, please, share on Twitter
? I make free written accessibility review so that you don’t make common mistakes. If you’re interested in that chat me on melnik909@ya.ru or dev.to direct. Please, specify the subject of the email “Stas, need help”

? If you want to be first who take my tips get my paid subscription on Patreon

? Make a gift yourself or friends who like frontends: ? T-Shirt, ? Stickers, ? Masks, ? Magnets

P.S.S. This post was written with the support of my sponsors: Ben Rinehart, Sergio Kagiema, Jesse Willard, Tanya Ten.


Print Share Comment Cite Upload Translate
APA
Stas Melnikov | Sciencx (2024-03-28T10:52:37+00:00) » Improving UX of forms using only HTML. Retrieved from https://www.scien.cx/2021/08/02/improving-ux-of-forms-using-only-html/.
MLA
" » Improving UX of forms using only HTML." Stas Melnikov | Sciencx - Monday August 2, 2021, https://www.scien.cx/2021/08/02/improving-ux-of-forms-using-only-html/
HARVARD
Stas Melnikov | Sciencx Monday August 2, 2021 » Improving UX of forms using only HTML., viewed 2024-03-28T10:52:37+00:00,<https://www.scien.cx/2021/08/02/improving-ux-of-forms-using-only-html/>
VANCOUVER
Stas Melnikov | Sciencx - » Improving UX of forms using only HTML. [Internet]. [Accessed 2024-03-28T10:52:37+00:00]. Available from: https://www.scien.cx/2021/08/02/improving-ux-of-forms-using-only-html/
CHICAGO
" » Improving UX of forms using only HTML." Stas Melnikov | Sciencx - Accessed 2024-03-28T10:52:37+00:00. https://www.scien.cx/2021/08/02/improving-ux-of-forms-using-only-html/
IEEE
" » Improving UX of forms using only HTML." Stas Melnikov | Sciencx [Online]. Available: https://www.scien.cx/2021/08/02/improving-ux-of-forms-using-only-html/. [Accessed: 2024-03-28T10:52:37+00:00]
rf:citation
» Improving UX of forms using only HTML | Stas Melnikov | Sciencx | https://www.scien.cx/2021/08/02/improving-ux-of-forms-using-only-html/ | 2024-03-28T10:52:37+00:00
https://github.com/addpipe/simple-recorderjs-demo