I'm one of the developers of Slint[0], a framework the should be ticking all the boxes for stable, lightweight, and native-style UIs supporting accessibility
So far, I have tried Qt directly with C++ and python bindings (pySide6, pyQt), where C++ is definitely the lighter option.
If you consider python bindings, you could also look into JavaFX. It has the advantage of native images or the option of a fat jar containing all platform dependant FX modules. But the resulting files won't be small.
The most obvious answer would be to use the OS's native UI widgets, e.g. in Windows maybe even Win32 widgets. With under 200 lines (!) of C/C++ code you get windows, buttons, text fields, lists, tables, whatever you need. The end result is an executable of size less than 8 kilobytes, and has been working last 20-30 years in the past, and most probably will work decades in the future.
Besides, there isn't really "cross-platform GUI", because not every platform has same kind of widgets and behaviors.
Honestly, I don't get the Electron hate. The majority of developers here on HN probably use VS Code as their editor, and that editor was made with Electron. For a lot of companies who don't have a desktop app as their main product, it simply isn't feasibly to have a dedicated Windows developer, a Mac developer, and a Linux developer, when you can do everything with one codebase.
Consider Compose Multiplatform and Kotlin Multiplatform
Tk using the themed ttk widgets might meet your needs, not sure about accessibility though. Wxwidgets is also an option but can get weird with the native controls, not sure about accessibility there either.
I am using wails in one of my personal project currently. It's basically a combination of any frontend stack with go. File size is pretty minimal.
Java. JavaFX has native binding to the underlying platform.
A few other options to consider:
- Lightweight local web server + web page combo
- Native layer for each platform + shared business logic parts
- Some game dev engine could also work - Unity, Godot..
PWAs! Just use the browser. The safest, fastest option
Qt? MAUI?
I always go for Qt for this(with C++ for bigger project and Python for lighter).
There's also Delphi, which ticks all the nice boxes for UI requirements. But licencing is tricky there, not everything is available in community edition and more difficult to find support / developers for the project. Having said that, it's still great.
Kotlin with compose multiplatform shaping up too, so something to test out if it matches your current requirements.