DEV Community

Discussion on: How to add "SKIP TO MAIN CONTENT" to websites

Collapse
ishanpro profile image
Ishan Tiwari

You should also add

html {
scroll-behaviour:smooth;
}
Enter fullscreen mode Exit fullscreen mode


`
in your project. It will smoothen the effect and make the process more enjoyable for the user.

Collapse
inhuofficial profile image
InHuOfficial • Edited on

If you are doing that make sure that it either responds to the media query prefers-reduced-motion: reduce and switches it off or have an option to switch it off on the site.

Smooth scrolling can cause people with motion sensitivity to feel sick etc. As we are talking about an accessibility feature I think this is even more important to consider!

Collapse
ishanpro profile image
Ishan Tiwari

I didn't know that this can make people sick.

Thread Thread
inhuofficial profile image
InHuOfficial

Yeah look up “vestibular disorders”, it is quite common, especially for temporary conditions such as vertigo.

Easy enough to account for -> developer.mozilla.org/en-US/docs/W...

Just something to bear in mind while adding animations of any kind.

Thread Thread
kritikapattalam profile image
Kritika Pattalam Bharathkumar Author

True. Agree with you. Since this is related to accessibility will have to keep this in mind.