Sometimes you just need JavaScript

Last week, I shared a list of HTML and CSS replacements for things that used to require JavaScript.
One response I got to that article was a website dedicated to HTML and CSS alternatives to JavaScript components. And while I love that sort of thing in concept, the first three components on the page were not accessible (as in, they won’t work for people who use screen readers or have certain types of disabilities).


This content originally appeared on Go Make Things and was authored by Go Make Things

Last week, I shared a list of HTML and CSS replacements for things that used to require JavaScript.

One response I got to that article was a website dedicated to HTML and CSS alternatives to JavaScript components. And while I love that sort of thing in concept, the first three components on the page were not accessible (as in, they won’t work for people who use screen readers or have certain types of disabilities).

The site includes a note that “some of these demos may not be accessible and work on all browsers,” but puts the onus on developers to test that and evaluate. And, I’m sorry, but the typical developer looking for copy/paste tools doesn’t have the ability to do that. We’re not there as an industry yet.

The point I’m trying to make is that I absolutely love when the platform releases features that replaces JavaScript.

But not every “you don’t need JS for this” hack is better than using a JavaScript component. Often, JS is important and neccessary to build a component that’s complete and accessible.

For example, I often see image sliders or carousels built without JavaScript using CSS animations.

  • Can someone with cognitive impairments pause the animation to give them more time to take it in?
  • Can someone who suffers from motion sickness disable animations entirely?
  • Can a user move forward and backward through the “slides” on their own?
  • Are changes to the slides announced, so that a screen reader user knows what’s happening on the page?

There are tons of “CSS-only” hacks that are bare-minimum functional, but provide a worse and less accessible experience that adding a little bit of JavaScript.

JS isn’t bad. Using it poorly is. So is not using it at all when it would actually be the proper choice.


This content originally appeared on Go Make Things and was authored by Go Make Things


Print Share Comment Cite Upload Translate Updates
APA

Go Make Things | Sciencx (2021-06-02T14:30:00+00:00) Sometimes you just need JavaScript. Retrieved from https://www.scien.cx/2021/06/02/sometimes-you-just-need-javascript/

MLA
" » Sometimes you just need JavaScript." Go Make Things | Sciencx - Wednesday June 2, 2021, https://www.scien.cx/2021/06/02/sometimes-you-just-need-javascript/
HARVARD
Go Make Things | Sciencx Wednesday June 2, 2021 » Sometimes you just need JavaScript., viewed ,<https://www.scien.cx/2021/06/02/sometimes-you-just-need-javascript/>
VANCOUVER
Go Make Things | Sciencx - » Sometimes you just need JavaScript. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/06/02/sometimes-you-just-need-javascript/
CHICAGO
" » Sometimes you just need JavaScript." Go Make Things | Sciencx - Accessed . https://www.scien.cx/2021/06/02/sometimes-you-just-need-javascript/
IEEE
" » Sometimes you just need JavaScript." Go Make Things | Sciencx [Online]. Available: https://www.scien.cx/2021/06/02/sometimes-you-just-need-javascript/. [Accessed: ]
rf:citation
» Sometimes you just need JavaScript | Go Make Things | Sciencx | https://www.scien.cx/2021/06/02/sometimes-you-just-need-javascript/ |

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.