It's been done many times. HTML/DOM is a very primitive UI toolkit by any measure, even with extensions like mui.com beating it is not all that difficult. Are a few open source hackers going to manage - no. Can other companies manage it, yes. Especially accessibility really isn't as hard as people sometimes make out on this forum, and HTML isn't that good at it (because it lacks a lot of semantic information by default).
Consider the feature set of JavaFX when used in combination with the AtlantaFX theme/widget pack. It isn't well known, but is maintained and has an active open source community today.
- All the same controls as mui.com shows and more advanced ones too, like a rich text editor, a way more advanced table view, tree views, table tree views, etc.
- Media and video support.
- 3D scene graph support. HTML doesn't have this! If you want to toss some 3D meshes into your UI you have to dive into OpenGL programming.
- When using FXML, semantic markup (<TabView> etc)
- Straightforward layout management.
- A dialect of CSS2.something for styling, a TextFlow widget for styling and flowing rich text.
- Fully reactive properties and collections, Svelte style (or moreso).
- Icon fonts and SVG works.
- Sophisticated animations and timelines API.
And so on. It's also cross platform on desktop and mobile, and can run in a web browser (see https://jpro.one where the entire website is a javafx app), and can be accessed from many different languages.
Flutter is actually not quite as featureful in comparison, for example there's no WebView control or multi-window support on desktop, though Flutter has other advantages like the hot reload feature, better supported mobile story. The community is lovely too.
Then you have AppKit, which is also very feature rich.
So it's definitely a task that people have done. Many of these toolkits have features HTML doesn't even try to have. The main thing they lack is that, well, they aren't the web. People often find out about apps using hypertext and being able to have a single space for documents and apps is convenient. When you're not heavily reliant on low friction discovery though, or have alternatives like the app stores, then web-beating UI toolkits aren't that big of a lift in comparison.
> Electron isn't to blame for the issues with Teams. VS Code pretty much proves you can create a relatively responsive application in a browser interface
Electron is great, but most apps aren't VS Code. On my 2019 Intel MacBook Terminal.app starts in <1 second and WhatsApp starts in about 7 seconds. Electron is Chrome and Chrome's architecture is very specifically designed for being a web browser. The multi-process aspect of Chrome is for example not a huge help for Electron where the whole app is trusted anyway, though because HTML is so easy to write insecurely, sandboxing that part of it can still be helpful even with apps that don't display untrusted data. That yields a lot of overhead especially on Windows where processes are expensive.