logoalt Hacker News

PaulHouleyesterday at 6:37 PM2 repliesview on HN

Funny I have modals on my mind this afternoon and boy does it drive me up the wall that mainstream React frameworks still aren't using the <dialog> element and without that you will fail WCAG because all the other schemes that are supposed to hide the rest of the page don't.

It isn't even that hard, like I've been able to update the parts of MUI and reactstrap that my applications use even to calculate coordinates for portalized flyovers correctly. I could send but I just don't want to do the 5x work to do all the other components I don't use and then face the politics of a community that probably doesn't care if disabled people can use their products or even if they can check the boxes and pass WCAG. <dialog> is easy to use with HTMX and just a touch awkward with React because React insists on being level-triggered in edge-triggered situations but once you have it coded up <DialogsThatReallyWork/> just work.


Replies

grebcyesterday at 7:05 PM

Dialog is easy to use with just plain JavaScript.

show 1 reply
YetAnotherNickyesterday at 8:42 PM

WCAG is lot lot more than just using <dialog> and unless you do a thorough review with a professional in this field, <dialog> won't solve anything. Do you know how many other WCAG guidelines your app or your site misses. No one knows that.

show 1 reply