← Back to context

Comment by abtinf

11 hours ago

The first thing I look for in any UI library is accessibility support. Makes it trivial to filter out toy projects.

"Accessibility" is an open-ended set of functionality, not a checkbox; it is never "complete", there is always room for improvement. Colorblind support (which ones)? High-Contrast mode? Adjustable text size? Screenreader integration? Localization? IME support? Keyboard navigation? Keyboard remapping? Functional entirely without a keyboard? Touch support? Pen support? Dyslexia-aiding typefaces? The list goes on and on.

  • One clearly defined starting point is exposing any custom controls to accessibility APIs that are used to enumerate and interact (simulated mouse actions, reading the text, etc) with controls on the screen. Both scripting tools and screen readers make use of these. Built-in controls already have the enumeration and interaction feature and don't need additional code, but custom controls may not have that.

    In the MicroUI example here, there are buttons and text labels and other kinds of controls, but no ability for an outside process to enumerate or interact with the controls. Any program will just set a single giant window with no text and no controls inside. Accessibility software can still hook text output APIs, but not if it also uses custom font rendering.

    Anyway, the Windows accessibility API is just implementing a few COM objects, and COM (other than the specific ABI used for storing the vtable and function call convention) is not necessarily specific to Win32.

No. As much as I would like it to be the case, that is most certainly a poor criteria to evaluate a UI library.

Dear ImGui [0] is without a doubt the most prevalent immediate mode UI library. It does not have native accessibility features, but that hasn't stopped companies such as Intel, Meta, IKEA and Google from shipping products built upon it. It's also used in a ton of games.

Calling Dear ImGui a toy project at this point would be like calling Unreal Engine a toy project.

It's a shame accessibility support is not more widespread, and furthermore it's a shame that it is so laborious to add it.

0: https://github.com/ocornut/imgui/

  • You've cherry picked a very specific example that is designed to run in 3d engines. For anything rendering at standard OS api level level (the vast majority libs), accessibility is fine as evaluation criteria.

    • > You've cherry picked a very specific example that is designed to run in 3d engines.

      This post is about a minimal immediate mode library made by a game dev, most suitable for debug menus.

      It's unreasonable to treat it as a platform for soapboxing about "the vast majority libs" that are unrelated.

  • OK, if "toy project" isn't the right word, then perhaps, "unethical" or "exclusionary" would be better words to use.

    I judge software harshly that could be useful to folks with accessibility needs that don't try to address it (within bounds of their resources and capabilities, obviously lots of OSS just doesn't have the ability to deliver an accessible experience for tiny little throwaway apps). I definitely choose technologies to use based on whether they can be accessible with a little extra effort on my part. I'm not necessarily good at it, it's a complicated topic, but when I get bug reports about an accessibility issue I tend to drop everything else and try to fix it.

    I guess a lot of folks consider games exclusively for folks without those accessibility needs, so maybe that's why something like Dear ImGui can live for years in thousands of projects without anyone complaining about accessibility. But, I wouldn't consider it for anything that isn't specifically about graphics and I don't think anyone else should either. (No one has to listen to me, but I think less of them.)

    • > I guess a lot of folks consider games exclusively for folks without those accessibility needs, so maybe that's why something like Dear ImGui can live for years in thousands of projects without anyone complaining about accessibility. But, I wouldn't consider it for anything that isn't specifically about graphics and I don't think anyone else should either. (No one has to listen to me, but I think less of them.)

      Immediate mode UIs are mostly for debug menus, not even gameplay/graphics. It doesn't need to be accessible to anyone except for the developer(s) choosing the library and making the game. (If the developer has different needs, obviously they can choose another library, unlike users who must live with the developer's choice.) The fourth sentence in the linked ImGUI repository explains this intention very clearly.

      You can spend all this energy imagining malice and thinking less of others, but doing so does not add merit to your critique. Nor does it advance the cause of software accessibility.

Windows XP has better accessibility than anything since, by virtue of staying entirely out of the way of accessibility tools. Time to downgrade!

This is a library in similar vein to "Dear imgui", minimal requirements for integration (rectangle and text rendering) so that it's easy to embed into game-engines,etc for debug UI's and similar things.

Not very smart. I would go further and say that even full unicode support could be avoided and a software can still be massively useful.

It is sad that the world is so hung up on unicode and things like accessibility that we all have to submit to the tyranny of browser layers!

  • > sad that the world is so hung up on unicode

    It is sad that the world is hung up on enabling 2/3rds of the world population to read and write text! If only the entire world catered to America. Nobody should ever speak anything other than English, honestly.

    • Get a load of this guy here. He thinks that humans beings cannot communicate if some computer programs does not talk in their language!

I agree, and the lack of empathy around this area is sad. If you're developing an app, it is better to fall into the pit of success by using a UI framework that already has accessibility baked in. Any project that uses Dear Imgui for end-user applications has already made a bad design choice. AccessKit (https://accesskit.dev/) seems to be a positive step forward, with some UI frameworks implemented (including immediate mode egui).

  • It's supposed to be a _tiny_ library. Naturally its capabilities will tend towards being minimal. I don't expect decent RTL language support, for example, although it's quite important if those are the languages where you live.

    As for linking to something written in Rust with bindings etc. - that is the opposite of tiny when you consider the dependencies, and it would not be portable to weaker or older systems.

Is there any game engine out there with good accessibility support for their UI?

  • I can’t say how it compares to others, but Godot added screen reader support in 4.5 a year or so ago.

Or, not every UI library is intended for use cases where a13y even makes sense.

Like a debug UI in a game engine, or in an embedded device that doesn't even have input for a13y.

  • Being accessible to the intended users always matters. If you think it doesn't, that probably means it's currently accessible to those users (or that those who are it is inaccessible to have filtered themselves out, and are no longer users).

    For example - in your debug UI, colorblind-friendly colors don't matter, until you hire your twelfth member of the team, who struggles to tell red and green apart.

What? On a micro immediate mode UI?

Really insane comment TBH

  • The point of a UI library is to interface with users. If it totally fails to interface with a subset of users then it is obviously deficient to some degree. It is callous and foolish to dismiss offhand users who rely on assistive technologies. You probably have a poor idea of who they are and how many people we’re talking about. You never know when you or someone you care about will become one of them, even temporarily. You never know how far your software will reach when you write it.

Then just save yourself some time. Immediate mode and accessibility are mutually exclusive.