Comments (8)
The WebKit team at Apple supports the idea of implementing inert
. It's not at the very top of our priority list but we're actively considering it. We'd also support putting it back in the HTML spec
Caveat: some personal opinions I haven't discussed with the team. I don't think inert
would be better expressed in CSS. CSS is about presentation, not behavior. Stuff like user-select
and -webkit-user-modify
seems in retrospect kind of regrettable. Also, the inability to escape inert
from within a subtree seems like a feature not a bug. An inert
CSS property would not be sufficient for implementing dialog
either, both because of the ability to escape, and because dialog
also includes novel stacking behavior.
from inert.
Not necessarily Mozilla's opinion, but my personal opinion is close to Edge's.
I do think it is worth thinking more into whether this should be a CSS property, or something implemented in the UA sheet:
[inert] {
pointer-events: none;
user-select: none;
user-focus: none; /* new property ? */
}
On the other hand, implementing inert
as it is right now is somewhat consistent with the disabled
attribute, so I would be fine with implementing initially as it currently is.
from inert.
There is a discussion on the forum on CSS Toggle States. The idea of Toggle States (if implemented in some fashion) + inert as a CSS property is super compelling. For example, it would allow a CSS-only navigation drawer to exist and be accessible. So, I feel like the Edge team has a really good idea there that deserves some further exploration.
from inert.
Making things focusable in CSS is also discussed in WICG/spatial-navigation#25
from inert.
@robdodson I'd be interested to hear an update on this, if one was available.
from inert.
@MelSumner I haven't personally spoken with any other browsers about focus-visible but I've been heads down working on other projects so I may be a little out of the loop. @alice do you know if there have been any conversations?
from inert.
@MelSumner ah sorry, I misread and thought y'all were asking about focus-visible. I also haven't done much with inert but I know alice has been working on adding it back to the standard. whatwg/html#4288
from inert.
@othermaciej Thanks so much for the comments!
I agree with all of your personal opinions, and wanted to expand on this one:
An inert CSS property would not be sufficient for implementing dialog either, both because of the ability to escape, and because dialog also includes novel stacking behavior.
Indeed, on my backlog of "ideas to write up as concrete proposals" is a top layer API which would explain both the "inert everything else" and the stacking behaviour of dialogs. I think those two things belong together, as the "inert everything else" behaviour is visually indicated by the combination of stacking and backdrop. It would obviously reuse the definition of "inert" used by both <dialog>
and the inert
attribute.
from inert.
Related Issues (20)
- Unknown Syntax error in IE HOT 4
- Is inert string or boolean? HOT 4
- module should not use src/index.js
- Transpile the module export HOT 1
- Specify exact browser support in MDN browser compat data
- How can I check if the polyfill is already loaded? HOT 3
- When inert library is imported more than once in a project, creates error HOT 2
- “So every modal dialog must be outside the inert container?” HOT 1
- Relation to content-visibility: hidden HOT 6
- License for NPM wicg/inert HOT 5
- should the _focusableElementsString include tabindex? HOT 3
- Video elements being focused HOT 1
- `Element is not defined` in deno
- Styles are too easily overridden
- Polyfill being applied in Chrome 102 HOT 3
- Tests should not run against browsers that have implemented inert
- Add new gh webhook?
- Status of incubation HOT 4
- W3C Software and Document License (2015/05/13) was expired HOT 3
- Malicious behavior detected in wicg-inert-3.1.2 package HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from inert.