Accessibility stuff can be challenging. I’ve spent hours trying to figure out how I can have listboxes correctly report their underlying values through the Accessible properties, and have completely failed to find any solution. Even finding how listbox items are used in such a context has proven more than I can find. Searches of all sorts just bring up either the most basic stuff (how do I use a listbox level stuff) or leads me to the Microsoft docs, which are useless. Very frustrating.
What I’ve ended up doing is a mix of two things: (1) rebuilding the list during the refresh of data, or (2) replacing the dirty items in place during the refresh. I tended toward the full rebuilding on smaller lists in places where there’s already less robust handling, and I have so far used the replace-in-place method for the Classic View trait lists. Either way is a performance hit versus the simple repainting that I was doing, or what I wanted to do which was create a new AccessibleObject that could report itself correctly. However, at least now I have something that works, so I’m just not going to waste my time trying to find the best solution I was looking for.
Now I think I only have to write a new InputBox for simple ‘enter a value’ options used by the Input directives in lots of places. InputBox is a built-in feature from Microsoft, so I was pretty surprised that it appears to have no Accessibility support. Anyway, once that’s done, I think I’ll have the current set of Accessibility issues clear.
And there are a lot of places with terrible tab orders, which I should try to find and fix as well.