this post was submitted on 05 May 2025
105 points (95.7% liked)

Programming

20943 readers
75 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 2 years ago
MODERATORS
all 41 comments
sorted by: hot top controversial new old
[–] [email protected] 39 points 1 month ago (2 children)

JavaScript sucks. I hate using it I hate coding it.

I whitelist js sources on my personal computer.

Only absolutely necessary for function scripts get loaded.

If they ask me to disable the adblocker I blacklist the domain.

[–] [email protected] 30 points 1 month ago* (last edited 1 month ago) (2 children)

I've done more than 18 years of dev work. I only hate js. All the other parts of the job are fine. Other languages are fine as well. I've had to learn so many. Hell I know cobol right along side ruby.

Js sucks. It sucks to debug. Its frameworks still have issues with basic stuff like many to many relationships.

All the solutions that don't use or use it sparingly work for years. The ones that rely on the language usually die a firey death by npm/yarn or get deprecated within 6 months.

[–] [email protected] 18 points 1 month ago (1 children)

Js frameworks make php frameworks seems stable efficient and logical by comparison.

Yikes.

[–] [email protected] 12 points 1 month ago (1 children)

Modern day php and laravel is actually not terrible.

But yeah I agree with you.

[–] [email protected] -3 points 1 month ago

Laravel is shit.

I can believe it became popular only because devs don't care about the code.

[–] [email protected] 1 points 1 month ago

Its frameworks still have issues with basic stuff like many to many relationships.

Not sure what you mean by that. Do you mean ORMs? Which one and when did you try it?

[–] [email protected] 5 points 1 month ago

Javascript is like Dungeons and dragons. It's a mess, weighed down by legacy decisions, too heavy in some places and too light in others, and used in far more places than it should be. It also has some diehard fans, and some diehard fans who have never used anything else.

[–] [email protected] 35 points 1 month ago* (last edited 1 month ago) (3 children)

Note there's a group of users that larger than the group of users without JS (for whatever reason): users of assistive technology. And they don't even have a choice.

While I'm all for considering the needs of every user... If you get to the point where you're worrying about no-JS users, I hope you've already considered the needs of people with disabilities, whether temporary or permanent.

Edit: oh right, wanted to add: just making a site work without JS doesn't automatically make it accessible to people with special needs.

[–] [email protected] 10 points 1 month ago* (last edited 1 month ago) (3 children)

No-JS pages that fully comply with WAI ARIA are much better for users of assistive technology than any single page web app can ever hope to be. All the myriad states that an interactive JS page can enter are absolutely never ever properly tested for disabled users, and even after full expensive testing, just a little change in the JS can ruin it all again. While with WAI ARIA you can just quickly assert that the page is compliant with a checker before pushing it to live.

[–] [email protected] 5 points 1 month ago* (last edited 1 month ago) (2 children)

This is both factually incorrect, and ignores the original point.

First of all, no you cannot just run an automatic WAI ARIA checker. That will highlight some surface level basic structural issues but in no way is adequate testing for a pleasant accessible UX.

Secondly, modern frameworks like React and Angular have the same ARIA validation utilities. It does not matter whether components are loaded in dynamically by the framework as long as they're defined in the codebase where linters and code analyzers can run.

Thirdly, you're ignoring the actual point that is being made. You know as well as I do, that virtually nowhere actually puts serious effort and usability testing into websites making sure their websites are accessible, and that directly impacts the lives of millions of people who are cut off from the world of technology because of a disability.

Until you're making all of your websites and apps accessible by second nature (i.e. until at a bare minimum you have your Web Accessibility Specialist certification), then focusing your time and efforts on catering to a niche ideological no JS crowd is quite frankly somewhat cruel and self serving.

[–] [email protected] 6 points 1 month ago* (last edited 1 month ago)

If you want to learn the stuff necessary for that certification, here's a document, the WAS Body of Knowledge listing what you need to know and maybe where you can learn that. Less detailed version in the WAS Exam Content Outline.

[–] [email protected] 1 points 1 month ago

Heh, just deleted my reply - thanks for covering all that, you're exactly right :)

[–] [email protected] 2 points 1 month ago* (last edited 1 month ago) (1 children)

Definitely not. NoJS is not better for accessibility. It's worse.

You need to set the ARIA states over JS. Believe me, I've written an entire component library with this in mind. I thought that NoJS would be better, having a HTML and CSS core and adding on JS after. Then for my second rewrite, I made it JS first and it's all around better for accessibility. Without JS you'd be leaning into a slew of hacks that just make accessibility suffer. It's neat to make those NoJS components, but you have to hijack checkbox or radio buttons in ways not intended to work.

The needs of those with disabilities far outweigh the needs of those who want a no script environment.

While with WAI ARIA you can just quickly assert that the page is compliant with a checker before pushing it to live.

Also no. You cannot check accessibility with HTML tags alone. Full stop. You need to check the ARIA tags manually. You need to ensure states are updated. You need to add custom JS to handle key events to ensure your components work as suggested by the ARIA Practices page. Relying on native components is not enough. They get you somewhere there, but you'll also run into incomplete native components that don't work as expected (eg: Safari and touch events don't work the same as Chrome and Firefox).

The sad thing is that accessibility testing is still rather poor. Chrome has the best way to automate testing against the accessibility tree, but it's still hit or miss at times. It's worse with Firefox and Safari. You need to doubly confirm with manual testing to ensure the ARIA states are reported correctly. Even with attributes set correctly there's no guarantee it'll be handled properly by browsers.

I have a list of bugs still not fixed by browsers but at least have written my workarounds for them and they are required JS to work as expected and have proper accessibility.

Good news is that we were able to stop the Playwright devs from adopting this poor approach of relying on HTML only for ARIA testing and now can take accessibility tree snapshots based on realtime JS values.

[–] [email protected] 1 points 1 month ago* (last edited 1 month ago)

Well, I suspected this might be the case - since I have never worked somewhere the functionality is actually end user tested - only worked with some accessibility "experts" for a short while that just made sure the code ticks the right boxes. I somehow hoped the state of the technology rendering the HTML code and the state of WAI ARIA was better, but it seems not to be the case.

[–] [email protected] 5 points 1 month ago (1 children)

Doesn't avoiding JS typically structure a website in such a way that the browsers built-in assistive services can cover it easier?

[–] [email protected] 2 points 1 month ago (1 children)

Not necessarily, unfortunately. (Though I guess technically it's easier to throw up barriers using JS, but it's not an inherent quality, and leaving it out doesn't automatically make it good.)

[–] [email protected] 3 points 1 month ago (1 children)

I'm curious what parts would be challenging to use with a screen reader? If a site just has basic links and no JS, I can't really think of anything unless the tab layout is somehow completely shuffled due CSS.

[–] [email protected] 4 points 1 month ago (1 children)

A comprehensive answer is out of scope and probably best given by a true accessibility specialist, but for example, if you only use <div> tags for everything, a lot of the screen reader's affordances for navigating are unusable. Images that carry information but not in their alt text are another simple example.

And then there are parts where JS could actively help. For example, if you have a tabbed interface, but clicking a tab results in a full page refresh, the screen reader loses all context.

Also keep in mind that there's more to assistive technology than just screen readers, e.g. sufficient colour contrast and keyboard navigability are important to many people. Too many websites still get those basics wrong.

[–] [email protected] 3 points 1 month ago* (last edited 1 month ago)

Thanks for responding. I'm not really a web dev, so I haven't thought about it much.

The tab layout and <div> examples were definitely not things I was thinking about. I guess that's a good incentive to use tags like <section> and <article> instead of divs with CSS classes.

I'm actually a bit color blind myself, so I appreciate sites being high contrast and not relying on color alone for indicators. A surprising number of sites completely break when trying to zoom in and make text bigger too, which is often due to bad floating layouts. Especially if it's resized with JS...

[–] [email protected] 0 points 1 month ago (1 children)

They overlap. Js is a shit technology for the blind.

Dynamic sites that move / hide / unhide components as you do things are unhelpful and confusing. A screen reader will tell you what's under the cursor right now. If that changes, you don't get notified that you're now pointing at something else.

Static sites are better for accessibility too.

[–] [email protected] 1 points 1 month ago

They can overlap, yes. Static sites are definitely not automatically better for accessibility.

[–] [email protected] 33 points 1 month ago

The point is: a lot of people browsing your site will at least temporarily have a no-JS experience without intentionally doing so.

💯

[–] [email protected] 27 points 1 month ago

Sadly, the rise of frameworks and SAAS have really killed security and accessibility through enforcement of JS.

'Back in the day' performance, download size, backwards compatibility, and non-js functionality was expected. Now it's not even on the radar for most big corps/agencies. Many places I've worked don't even care about responsiveness, which is crazy.

Now, there are so many 25mb websites that are unusable without JS or the right device...

[–] [email protected] 12 points 1 month ago

Hmm...this has me thinking, maybe I'll change up my Hugo site a little, so that there's no dropdown menu - it's the only thing javascript is needed for.

Thank you for this, some points that I'd not even considered, and a helpful reminder to myself to try and get that javascript from 99% to 100% unused. :)

[–] [email protected] 10 points 1 month ago* (last edited 1 month ago)

Not to mention, more accessible.

[–] [email protected] 10 points 1 month ago

People should not be prioritizing no-JS users. No one turns off JavaScript.

If you keep the JS to a minmum, you have

  1. less work maintining that shit, HTML/CSS is patient
  2. better user experience

So much forms and textboxes don't save content anymore after a reload, because it's dynamically loaded from somewhere or even a frame handled entirely by JS. Buttons/Checkboxes that don't work, it's sad.

[–] [email protected] 7 points 1 month ago (1 children)

Couldn't agree with this more.

Every time I create a website, I first create it with only HTML. If it looks right and makes sense, then I will add CSS. If it looks good and works fine, then I will add JS.

[–] [email protected] 1 points 1 month ago (3 children)

A lot of people who shared this sentiment were hung up on the idea that “no one turns off JS.” But some people do, for a variety of good reasons!

What % are we talking about? 50%, 25%, 10%, 1%, 0.1%? People make choices, but those are their choices. I need to get the job done and I can't cater to everyone's needs.

[–] [email protected] 3 points 1 month ago (2 children)

Forget about your job for a moment. In general, why are you willing to set a threshold on how accessible your work is? I urge you to forget about how callous your employer wants you to be.

[–] [email protected] 1 points 1 month ago

Not using JavaScript doesn't ensure an accessible site or app.

[–] [email protected] -3 points 1 month ago

You call people callous for using js? 😂 Sorry, I'm not interested in a conversation with a fanatic because that kind of arguments have zero value.

[–] [email protected] 1 points 1 month ago

And who has to maintain it, not you?

[–] [email protected] -2 points 1 month ago

I can't cater to everyone's needs.

Can't wait for the law to slap you in the face someday.

[–] [email protected] -4 points 1 month ago* (last edited 1 month ago) (1 children)

Lmao, oh yes, let's go back to the golden age of every app having all of its logic running on centralized servers, rather being able to easily create cross platform client side distributed applications.

The "no-js" philosophy is fundamentally at odds with a future of distributed, OS agnostic, application development.

It remembers the web when the web was simpler, and ignores that that was the era of dll hell and applications being locked to specific OSes. The modern web is the most successful cross platform development framework by orders of magnitude,it's all based on open internationally agreed on standards, and it is vastly simplifying and detangling the overall computing environment / platforms that we used to be locked to.

Just use a framework like Nextjs or it's open source off shoots / clones and get the best of both static pre rendering and dynamic on the fly rendering.

[–] nomugisan 8 points 1 month ago* (last edited 1 month ago) (1 children)

#1 popup and tracker enjoyer over here

[–] [email protected] -1 points 1 month ago* (last edited 1 month ago) (1 children)

I use utilities like unlock origin, a pihole, etc to block trackers and ad network requests without blocking literally all logic that can run on a page, which works great as an interim solution.

And the long term solution to advertising and tracking is legislation, not throwing out a computer's ability to compute.

[–] nomugisan -1 points 1 month ago (1 children)

Personally I think it's better if WWW moves beyond HTTP as a protocol

[–] [email protected] 1 points 1 month ago

HTTP is really nice. We should move beyond HTML as a document format