Urgent.News

What's breaking now, across thousands of outlets.

Tech

HTML Can Do That

Article URL: https://chrisburnell.com/html-can-do-that/ Comments URL: https://news.ycombinator.com/item?id=49362689 Points: 369 # Comments: 105

HTML has taken on more dynamic functionality that used to be handled by JavaScript. This page showcases a variety of features that can now be achieved using solely HTML. It is important to note that the browser implementation of some of these features is currently lacking and may not meet accessibility standards.

One example is the use of the popover and popover-target attributes to manage popovers and popovers without the need for JavaScript. Similarly, modal dialog boxes can be implemented using dedicated elements and the command and commandFor features, which can be useful for a wide range of non-JavaScript functionality in the future.

The accordion element can be created by using a shared name attribute to group details, causing one to be closed automatically when another is opened. It is also possible to control a popover using separate HTML buttons without any scripting.

Other features include lazy loading of images, navigation to hidden sections, and a new attribute for automatically removing hidden elements until they are found. This feature is still relatively new and works best with browser default search functions.

The HTML color, date, and range pickers, along with meters and progress bars, are now built into the browser, providing a more native user experience. However, these elements may require careful consideration due to varying browser styles and accessibility issues. Native autocomplete suggestions are also available without the need for dropdown libraries.

It is important to note that some of these features are not yet fully supported across all input types and may have issues in their implementation. Adrian Roselli's Under-Engineered Comboboxen provides more information on these potential pitfalls.

Written by urgent.news from Hacker News Best's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

This story

This is one outlet's version. Read the fullest account.

Every outlet that reported this, and when →

Read the original at chrisburnell.com →

More in Tech

More from Wednesday 19 August →