Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
C0D4681385yGive me a non JS alternative to interact with a webpages DOM that Doesn't Require JS to interact with it either, I'll be using it tomorrow.
Until then, it's real, it's used a lot, and my only issue with JS is "full stack JS devs" who do nothing more then "npm start" to think they are full stack. -
C0D4681385y
-
@C0D4 Okay but there are surely libs for that. One js function is almost as good as no js function call
-
C0D4681385y@12bitfloat there are, but then you're using more js to interact with it's replacement. Kinda pointless since it's suppose to be a replacement.
-
@C0D4 The main problem with frontend JS is stupid devs who abuse JS for stuff that ought to be done entirely without JS (using HTML or CSS), or for shit that shouldn't be on a website to begin with.
My fav in stupidity is some useless div with an onclick handler that changes the URL of the document. That's what a fucking anchor is for! -
C0D4681385y@Fast-Nop πdon't get me started on divs with onclicks, the only place I can half agree with onclicks in elements that aren't links is table headers being used for data sorting, because... it makes sense.
But yea divs or spans being used as A tags with function calls Like
<div onclick="goToPage('pageName.html');">
Some content
</div>
Is a delight experience. -
@C0D4 And also, the keyboard handling is usually forgotten, or people implement some half-assed shit that doesn't quite get the difference between buttons and links with regard to the space bar.
Btw., I think this table sorting feature should be a button because it changes in-page state only, and then it would also work via keyboard handling, and it would be in the tab order. Can of course be styled via CSS to not look that button-ish in this case. And disabled in the markup so that with JS blocked, it's at least not confusing.
The occasions where an onclick on neither a link nor a button makes sense are pretty rare. Like, some games, maybe a chessboard where you click which piece to move where. -
C0D4681385y@Fast-Nop sure of done right, or the dev has any sense of accessibility... that's something no one cares about anymore either π
Granted if it's data you want to return to at a sorted state, you would include URi params to listen too, as for keyboard users... I tend to forget about them beyond nav / forms but I see you're point for controllable data sets. -
@C0D4 Yeah and then companies wonder why they find themselves losing in court over the inaccessible bullshit their web devs created - like Domino's:
https://cnbc.com/2019/10/... -
C0D4681385y@Fast-Nop ah US courts.
Yea we have a similar thing here in AU, any Gov site by law must be WCAG 2.0 compliant, however anything else is optional, although I try to stay 508 compliant personally.
https://australia.gov.au/accessibil... -
@C0D4 WCAG has already version 2.1, most importantly with regard to the contrast of graphic elements against background. Also, I'd go for level AA and not just A. For the main text contrast, level AAA.
Making shit legible also benefits non-impaired users. Gosh I hate these fuckheads with their light-grey, thin fonts on white backgrounds that they pulled from their designery asses.
And the rest is mostly using proper semantic markup - which is what HTML has all been about since the 90s. Mark up shit as what it actually means, and presto, NVDA will read it out so that it makes sense. Boom, solved. If the page makes sense with CSS and JS disabled, that's a solid starter.
It's only when these presentational monkeys show up with their shitshow that things go south. In recent times, their go-to is Bootstrap which seems to be designed to abuse markup in conjunction with presentational classes. Or at least, I've yet to see a Bootstrap infested site that isn't a presentational shitfest. -
@C0D4 "More js than it's replacement"
I don't understand what you mean?
You only need js to load a wasm binary, not to run it -
C0D4681385y@12bitfloat that's my point.
You still need js.
What's the point in a replacement if you still need to use the one thing it's designed to replace? -
@C0D4 It replaces js where is counts: The actual application. I mean why would you want to replace javascript in the first place? Because it's dynamically typed, it's slow, it's big, etc. All of these things are kinda irrelevant when it's only the wasm loader (that you probably don't even have to code yourself). I can understand the wish to replace JS out of principle, but this doesn't seem like a problem to me
JavaScript is not real code! Shots fired!
rant