4 ms·
Non-interactive Elements with the inert attribute
- rubans 5y agoI came across this attribute when making a model/popover widget to capture focus, which is necessary for accessibility and keyboard navigation. Works great and will be using again.
- keltex 5y agoMostly non-supported: https://caniuse.com/mdn-api_htmlelement_inert https://caniuse.com/mdn-api_htmlelement_inert
- derefr 5y agoYou mean, mostly hidden behind a browser config flags (rightly) defining it as still experimental. It's very new!
- TAKEMYMONEY 5y agoA bit of pedantry: it's actually very old, as the article mentions, even being removed from the spec at one point [1] and then being added back in. https://github.com/whatwg/html/commit/5ddfc78b1f82e86cc202d72ccc752a0e15f1e4ad https://github.com/whatwg/html/commit/5ddfc78b1f82e86cc202d7...
- TAKEMYMONEY 5y agoWouldn't something like `non-interactive` make for a better name? "Inert" typically means things that don't move, it means things that don't react in a less-common, chemical sense. Even when used then it would be a metaphor in this context.