Show HN: Alloy CSS, dialogs, menus and tabs that work with JavaScript off alloyh...
Show HN @show
Show HN: Alloy CSS, dialogs, menus and tabs that work with JavaScript off alloyhtml.com · 69 points · 11 comments · HN thread
TL;DR Alloy CSS is a stylesheet project that provides dialogs, menus, tabs and similar interactive components that work with JavaScript disabled. The submission links to a demo page: a fake invoicing app ('Ledger') built as a single HTML file with Alloy CSS and no JavaScript. The thread is mostly skeptical, centering on accessibility gaps and whether the approach scales beyond simple cases.
- Alloy CSS is presented as a way to build dialogs, menus and tabs without JavaScript.
- The demo page is a single HTML file styled with Alloy CSS, with no JavaScript, showing an invoice dashboard with tables, status badges, a pager and a toast-style notice.
- The demo's 'Ledger' app is explicitly made up; its numbers are sample data.
- Commenters note the class names are generic, which could clash with existing stylesheets when adding it to a current project.
- The one accessibility weak spot a commenter names is tabs, which screen readers announce as radio buttons rather than tabs.
- The demo's toast notification can only be dismissed by user interaction, which one commenter defends as an accessibility choice.
Discussion The thread is a mix of appreciation for the no-JavaScript idea and skepticism about its practicality. Several commenters like the minimalism and stability of pages that avoid client-side code, but others say native HTML is still full of rough edges and that CSS-only widgets become hard to maintain as complexity grows. Accessibility is the most debated concern: one commenter says the approach isn't accessible, another mentions lawyers and compliance risk, and the author of the library replies by asking for specifics and naming tabs as a known weak spot. The mood is cautiously curious rather than hostile, with a recurring point that native dialog and popover APIs plus light JavaScript may be the practical middle ground.
- Accessibility problems make JS-free widgets risky (some): Commenters say CSS-only components can fail assistive technology, and one says compliance concerns made them give up on the approach. The author acknowledges tabs are announced as radio buttons by screen readers.
- Appealing idea: pages that work without client code (some): Some commenters value minimalism, stability and content-oriented sites, and say doing as much as possible without JavaScript feels more permanent.
- Hacks don't scale; wants better native browser APIs (some): A commenter argues the no-JS workarounds are unintuitive and hopes browsers add more native APIs instead. Another comments that complex interactions will end up as convoluted machinery.
- Native APIs plus light JavaScript is the sweet spot (a few): One commenter says the HTML dialog and popover APIs are strong, but a bit of JavaScript smooths rough edges, such as letting toasts be dismissed automatically.
- Generic class names make adoption hard (a few): A commenter says the classes use common names that would conflict with existing styles, so it is only practical for new projects unless a prefix option exists.