Is “inert” the HTML Feature Of The Year?
With Chrome 102 HTMLElement.inert attribute is now active, it is also in the Firefox/Edge/Safari nightlies, so will hopefully become available for those soon.
This inert attribute aims to make interactive HTML inert as a rock.
Yes, it only took 32 years to disable interactivity like in HTML 1.0, hurrah!
To quote MDN:
The HTMLElement property inert is a boolean value that, when present, makes the browser “ignore” user input events for the element, including focus events and events from assistive technologies.
So it is like good old Enabled from the VCL. And this is a great addition to HTML! (more…)