The 5 Short Frontend tips for June

Hey folks!

I’d like to talk about creating animation for people with vestibular disorders, improving user experience when resetting password and filling in phone number, coding a search for screen readers and the show password pattern.

But before emb…


This content originally appeared on DEV Community and was authored by Stas Melnikov

Hey folks!

I'd like to talk about creating animation for people with vestibular disorders, improving user experience when resetting password and filling in phone number, coding a search for screen readers and the show password pattern.

But before embarking on reading I leave the link on my Substack newsletter about UX and a11y tips. You know what to make ๐Ÿ˜Ž

Let's go!

Taking care of users which can experience dizziness, nausea and headaches

Did you know your animations might cause dizziness, nausea and headache? ๐Ÿค”

The WCAG 2.2 has the section 2.3.3. which describes that users with vestibular disorders experience dizziness, nausea and headaches when they see a motion animation ๐Ÿ˜ฉ

So that doesn't happen we should use the prefers-reduced-motion media feature ๐Ÿ‘€๐Ÿ‘€๐Ÿ‘€ People with vestibular disorders might disable animations in OS options.

And we can detect that using the prefers-reduced-motion media feature to display animations for only people without disorders. So we will take care of users better ๐Ÿ˜Š

don't do this

.example {
  animation-name: zoomInDown;
  animation-duration: 1s;
  animation-timing-function: ease-out;
  animation-delay: 0.3s;
}

you can use this instead

@media (prefers-reduced-motion: no-preference){
  .example {
    animation-name: zoomInDown;
    animation-duration: 1s;
    animation-timing-function: ease-out;
    animation-delay: 0.3s;
  }
}

Save focus after form validation

I'm sure focus might improve a user life when he goes through form validation ๐Ÿ˜Š

Let's look at Preply. If we make a password mistake the app informs us about the mistake. But ... It resets user focus also ๐Ÿคฆโ€โ™‚๏ธ So I have to take my mouse and click by password input field again. And only then I can fix the mistake ๐Ÿ˜’

Image description

What can we make instead? I found a nice example on Booking. If we try to log in the app saves focus! And I haven't make more action and can just fix the mistake. Yay!๐Ÿ™Œ

Image description

Separate a country code from the main part of a phone number

Folks, a few days ago I was filling in my phone number on Preply. When I saved changes I've made the mistake ๐Ÿ˜’

Sure I wanted to fix it. So I started to edit that, push ctrl+A and delete keys. Oh... And I saw the country code was deleted.... So I had to fill in my phone number with +7 (code my country) ๐Ÿคฆโ€โ™‚๏ธ

Image description

That was terrible ๐Ÿ˜ค But I thought that may be a new advice. So I started to research and found the great example on Airbnb ๐Ÿ˜

When we fill in a phone number a key code is a separate part. Thus if we made a mistake we can select all, delete and start to fill in it again without a code country. Minus one action. Awesome! ๐Ÿ˜Ž

Image description

Do you wanna help users with vision disabilities use search?

Folks, did you know how people with vision disabilities start searching in apps? ๐Ÿค”

There is a special search WAI-ARIA role that's named 'search'. If we use it for search screen readers will start to display it in the "Regions list" mode that is used by users for quick navigation by page โ˜๏ธ

If that isn't done, users will have to look by hand. It's a lot harder.... ๐Ÿ˜ So, please, add role="search" to search in your apps ๐Ÿ™

Image description

Image description

Please, show password via Enter

Folks, a few weeks ago I tried to log in to Booking app and my girlfriend distracted me.

Image description

Blimey, after that I forgot what I typed. So I pushed Tab to use the Show password button. But focus has missed it having moved on the Sign in button.... It's the unreal fail ๐Ÿคฆโ€โ™‚๏ธ

How to make that better? View the Airbnb website. They allow users to use the keyboard to quickly focus from the field to the button. Push Tab then Enter and you see your password! Cheers! ๐Ÿฅณ

Image description

P.S.
โœ‰๏ธ I make free unlimited Q&A sessions about user-friendly web-interfaces (UX, a11y) via email with expect responses in 2 days.

๐Ÿ˜Ž I make free UX and a11y reviews of your non-commercial projects and recommendations for improvement.

๐Ÿง‘โ€๐ŸซI help in searching high-quality content about interfaces

Please, use my email for communication ๐Ÿ‘‰ melnik909@ya.ru

๐Ÿ’ช Get more free tips directly to your inbox

โค Thank you so much, my sponsors: Ben Rinehart, Sergio Kagiema, Jesse Willard, Tanya Ten, Konstantinos Kapenekakis.


This content originally appeared on DEV Community and was authored by Stas Melnikov


Print Share Comment Cite Upload Translate Updates
APA

Stas Melnikov | Sciencx (2022-06-05T17:55:49+00:00) The 5 Short Frontend tips for June. Retrieved from https://www.scien.cx/2022/06/05/the-5-short-frontend-tips-for-june/

MLA
" » The 5 Short Frontend tips for June." Stas Melnikov | Sciencx - Sunday June 5, 2022, https://www.scien.cx/2022/06/05/the-5-short-frontend-tips-for-june/
HARVARD
Stas Melnikov | Sciencx Sunday June 5, 2022 » The 5 Short Frontend tips for June., viewed ,<https://www.scien.cx/2022/06/05/the-5-short-frontend-tips-for-june/>
VANCOUVER
Stas Melnikov | Sciencx - » The 5 Short Frontend tips for June. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/06/05/the-5-short-frontend-tips-for-june/
CHICAGO
" » The 5 Short Frontend tips for June." Stas Melnikov | Sciencx - Accessed . https://www.scien.cx/2022/06/05/the-5-short-frontend-tips-for-june/
IEEE
" » The 5 Short Frontend tips for June." Stas Melnikov | Sciencx [Online]. Available: https://www.scien.cx/2022/06/05/the-5-short-frontend-tips-for-june/. [Accessed: ]
rf:citation
» The 5 Short Frontend tips for June | Stas Melnikov | Sciencx | https://www.scien.cx/2022/06/05/the-5-short-frontend-tips-for-june/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.