Random question but there doesn’t seem to be anything React specific in there. Could this be done from within the browser to help everyone using the browser at once?
-
-
Replying to @Vjeux @markdalgleish
That would be nice, but my hopes of getting something into the browser are much lower than into react. Also react features like portals play into this, so there might still need to be something in React to make focus follow the React tree order rather than DOM.
1 reply 0 retweets 6 likes -
There are various proposals to address most of these points but they're all slow moving :\ dialog: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog … inert: https://github.com/WICG/inert top layer (previously designed as "blocking elements"): https://github.com/whatwg/html/issues/897 … spatial navigation:https://github.com/WICG/spatial-navigation …
2 replies 0 retweets 9 likes -
Replying to @rob_dodson @devongovett and1 reply 0 retweets 0 likes
-
Replying to @rob_dodson @devongovett and
Good motivation to get things moving again! The RFC is interesting - I don't quite understand how FocusScope works, since one of the use cases allows focus escaping out of it via the tab key. If that wasn't the case I'd say it's more or less 1:1 with top layer...
1 reply 0 retweets 1 like -
Replying to @sundress @rob_dodson and
... which is somewhat polyfillable on top of `inert`, which obviously is already polyfilled, so I'd be curious to see how far you could get with that as the underlying mechanism.
2 replies 0 retweets 0 likes -
Replying to @sundress @rob_dodson and
The inert polyfill is pretty slow though since it needs to traverse the DOM a lot, and relies on mutation observer. Until it is better supported natively, I think it will be easier and faster to implement in React itself.
1 reply 0 retweets 0 likes -
Replying to @devongovett @rob_dodson and
Hm, I've profiled the performance and haven't found it to be slow in practice, though admittedly I haven't tried it on things which mutate the DOM frequently. Have you tried it and found it to be slow?
2 replies 0 retweets 1 like -
Replying to @sundress @devongovett and
Also, what's the user-base distribution? I.e., are the browsers where this is slow running on net-faster hardware?
1 reply 0 retweets 0 likes -
Replying to @slightlylate @devongovett and
Is that question to me or
@devongovett? :)1 reply 0 retweets 0 likes
@devongovett, in this instance.
Curious about how polyfill perf distribution fits over user privilege distribution.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
& Web Standards TL; Blink API OWNER
Named PWAs w/
DMs open. Tweets my own; press@google.com for official comms.