-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
Describe the problem
An element that is being removed from the DOM is still interactive, and still part of the accessibility tree. This means that (for example) it's possible to accidentally invoke a click handler on an element that should be 'dead'.
Since transitions are purely visual flourishes, it doesn't really make sense that outroing elements are still accessible.
Describe the proposed solution
The good news is that there's an inert property that can be applied to elements, which has exactly the desired effect.
The bad news is that it isn't supported everywhere.
The good news is that it will be supported everywhere when Firefox 112 comes out next week.
Since this is a breaking change (theoretically someone could be relying on the chaotic behaviour?), it ought to be part of Svelte 4 anyway, so the timing will work out nicely.
Alternatives considered
Not doing this
Importance
nice to have