Replacing JavaScript with Just HTML

Scope of What HTML Can Replace

  • Many commenters like seeing concrete HTML-only patterns (details/summary, dialog, basic validation, simple accordions, popovers) as a reminder that “the platform” can do more than people use.
  • The consensus is not “no JS” but “progressive enhancement”: implement a usable baseline in HTML/CSS, then add JS where necessary (state sync, richer UX, analytics, etc.).
  • Several server-driven tools (htmx, LiveView, Hotwire, Blazor, Livewire) are cited as ways to push more work to HTML/HTTP while still accepting JS for the hard parts.

Where HTML/CSS Still Fall Short

  • Complex widgets (tabs, accordions with precise behavior, comboboxes, robust autocomplete, complex date pickers) generally cannot meet accessibility specs or UX expectations without JS (e.g., ARIA roles, arrow-key navigation, focus management).
  • datalist is widely criticized: poor styling, inconsistent browser behavior, no good label/value separation, bad mobile UX, and no native way to stream large/remote result sets.
  • <select multiple> and native selects are considered clumsy; customizable select work in WHATWG is viewed as promising.
  • <dialog> and the Popover API are seen as incomplete in practice (layering issues, inconsistent positioning, limited hover activation; anchor positioning and @position-try are still emerging).

Details/Summary and Native Patterns

  • Many praise <details>/<summary> as an underused powerhouse: accessible by default, works without JS, searchable (and now auto-expands on find), supports grouping via name for accordion-like behavior.
  • Frustrations: hard to control open state solely from markup, tricky or inconsistent animations, difficulty mixing responsive behavior (always-open on desktop, collapsible on mobile), and limitations for building true ARIA-compliant tabs.
  • Debate over whether animating accordions is desirable at all: some see animation as wasted time, others as important for guiding less experienced users.

CSS vs JavaScript Trade-offs

  • Modern CSS (transitions, @starting-style, transition-behavior, interpolate-size, ::details-content, :has, anchor positioning) is praised as powerful and performant but also described as a growing pile of “incantations” that many devs struggle to keep up with.
  • Advocates argue CSS is more declarative, integrates with HTML, and yields smoother, hardware-accelerated animations than equivalent JS.
  • Others find a few lines of “straightforward JS” conceptually simpler than complex CSS features, though critics note that real-world JS implementations often balloon into large, buggy components.

Culture, Practice, and Hiring

  • Several note that frontend interviews still heavily favor React/JS patterns over semantic HTML/CSS knowledge.
  • Progressive enhancement and HTML-first design are framed as technically excellent but culturally overshadowed by “SPA everywhere” habits.
  • Overall sentiment: use HTML/CSS more than we do today, but accept that JS remains essential for many real-world, accessible, cross-browser interfaces.