DEV Community

Discussion on: 4 Tips for Web Accessibility

Collapse
 
georgewl profile image
George WL • Edited

Step 4 feels a little dated a method, especially as, as long as you're using semantic Web design, such as making sure you use buttons with onClick instead of divs with onClick, the majority of modern browsers send the same event through enter key as they would for a click.

There's also the issue that all of the steps done in jQuery could be done in vanilla JavaScript nowadays.

Collapse
 
heatherhaylett profile image
Heather

Thanks for the input! I hadn't thought about what might be handled by modern browsers. I will say my research opened my eyes to actions a person with a disability needs to use a computer such as keystrokes over mouse functions.

Is there a reason to use vanilla JS over jQuery?

Collapse
 
georgewl profile image
George WL • Edited

Mostly, bundle size, if you can have one less extra thing added to your bundle, you may as well.

And 99.5% of jQuery is now in the es6 JavaScript specification, so it is seen as wasteful to add it.

Thread Thread
 
heatherhaylett profile image
Heather

I see, good to know 👍🏻