It’s worth being aware that this approach to front-end development produces inaccessible UIs that may only be appropriate for personal projects and prototypes.
For example, showing a modal by only adding a single class to an element means that keyboard focus isn’t moved inside it automatically and a blind screen reader user won’t even know it’s opened.
One of the benefits of a framework with critical mass community adoption is that you can easily find open source examples of accessible UI components to learn from. You’ll be on your own in that respect if you find yourself needing to productionise something built with this approach.
Very very cool and inspiring to see so much behaviour captured in so little code here. Don’t mean to take away from that at all but felt it was worth commenting to add a little footnote mention of accessibility since this approach is somewhat presented as a general purpose alternative.
Gavin Elie
Python web application developer
How do I retrieve the value of a HX-Trigger item on the client side using _hyperscript?? I want to retrieve the dynamic value of showMessage for a notification message eg added, deleted, updated messages.