HTML Can Do That
HTML is quietly acquiring capabilities once solely reserved for JavaScript, enabling richer interactivity with less code. This post showcases several modern HTML features like popover and grouped <details> that empower developers to build dynamic UIs. The Hacker News community actively debates the practical utility and accessibility implications of these new standards, often celebrating the move away from JavaScript dependency while highlighting implementation caveats.
The Lowdown
The article "HTML Can Do That" champions the expanding capabilities of plain HTML, demonstrating how many dynamic features traditionally requiring JavaScript can now be achieved natively. Written for "HTML Day 2026," it highlights recent browser-supported elements and attributes, aiming to inspire developers to leverage HTML's growing power for more efficient and robust web development.
popover: Provides native functionality for transient UI elements like tooltips or menus, handling light dismiss andz-indexautomatically.<dialog>: A dedicated element for modal dialog boxes, which can be controlled by thepopoverattribute or JavaScript methods like.showModal().- Grouped
<details>: Using a sharednameattribute,<details>elements can form exclusive accordions where opening one automatically closes others. command&commandfor: These attributes enable HTML buttons to control other elements (like popovers) without scripting, with more functionalities planned for the future.- Native input pickers: Discusses built-in browser support for color, range, and date inputs, though warns about inconsistent styling and accessibility issues.
<datalist>: Offers native autocomplete suggestions for input fields, but the author cautions about spotty support and implementation flaws that affect its usability for robust comboboxes.loading="lazy": A simple attribute to defer image loading until it's near the viewport, eliminating the need forIntersectionObserver.hidden until-found: Allows content to remain hidden until a fragment link is navigated to, or until found via browser search, though its accessibility for screen readers is noted as still developing.
While celebrating HTML's evolution, the author pragmatically notes that many of these features, particularly form elements, still suffer from inconsistent browser implementations and potential accessibility pitfalls, urging careful and accessible application.
The Gossip
Reclaiming the Web with HTML
Many commenters express enthusiasm for HTML's increasing power, viewing these new features as a welcome step away from JavaScript-heavy web development. There's a sentiment that many single-page application (SPA) architectures might be overkill, and that modern HTML, possibly augmented by tools like HTMX, offers a more efficient path to interactivity.
Feature Fumbles and Accessibility Footfalls
Despite the excitement, a significant portion of the discussion highlights the current limitations and accessibility challenges of these new HTML features. Specific concerns are raised regarding `<datalist>`'s inability to enforce strong contracts or provide fuzzy filtering, and how some interactive elements lack consistent keyboard/mouse support. Questions also arise about the design choices for new dialog attributes, implying potential inconsistencies or unnecessary complexity in the API.
Unearthing Hidden Use Cases
The `hidden="until-found"` attribute sparks curiosity, with commenters seeking practical applications. The discussion zeroes in on scenarios where content should be visually hidden but discoverable via search, such as supplementary notes, pricing terms, or exclusions, making it accessible when actively sought out without cluttering the initial view.