Open ahicks92 opened 1 year ago
I just did some digging into this. Looks like the issue is that the configure autojobs div is unlabeled according to Firefox and (for some reason) completely removed from the accessibility tree in Chrome. So it can be done, but only by switching to Firefox and hitting the unlabeled button.
Unfortunately Firefox actually renders Trimps unplayable with NVDA, so that's not a solution. I'm not sure what's up there but the whole page freezes hard as soon as the game is unpaused.
I tried in chrome (and safari and firefox). I got a couple of menus to open (using Apple's VoiceOver) but I could not interact with those menus. To help me understand the issue better, can you supply two pieces of information: Are you able to interact with the AutoStructure menu, or if another menu, which one(s)? Also, what is your highest zone? (This will help me understand which menus you have unlocked.)
I'm on Windows with NVDA. You're trying to repro in the screen reader version, right? I'm not sure if you're the maintainer or just an interested bystander or what have you.
Highest zone is 157. I can give you the save if you want it.
I think the bug is just that you've got a button with stuff that's not text inside it and no aria-label, which tends to make Chrome freak out at least on Windows. There's a title attribute but screen readers intentionally don't care about that at least on Windows so maybe it's a typo and you meant aria-label? I don't know exactly how the two versions are being maintained, but the most accessible idiom is always <button>label here</button>
if you don't also care about visual presentation or something. The general pattern <tag role="button><span.../></button>
where span contains no text is, in my experience, quite problematic with Chrome.
I would love to suggest debugging tools but my debugging tool is NVDA because I'm blind so I can't really offer something better; and what I can think of probably claims that the button is at least in the tree, though it should also claim it's unlabeled.
Your problem with Voiceover (assuming keyboard with Mac) is almost certainly that the pop-ups don't grab the keyboard focus, which is a different thing all together. Trimps doesn't have an appropriate understanding of focus/tab management, but most of us don't navigate the web like that and so it kind of balances out.
I'm happy to test changes. I don't however have the time to try to hack on the html.
I am not a maintainer; I'm just a player who has become interested in contributing. I do not have prior experience with screen readers, but I'm giving it a try. Here is a link to my preliminary version in my personal forked repository. After doing your suggested edits, I'm now able to open the window, but I'm entirely uncertain how to interact with it.
Please use it and let me know how it goes. (If you're unsure how to download and use it, let me know whether you use the 'git' program or not and I'll supply appropriate instructions.)
Some more details: I've switched to Chrome on Windows with NVDA and I can now navigate to the tooltip menu popup by: Pressing the h key nine times, then the b key twice, then it says, "button configure AutoJobs." Using my edited version, I can now open the popup menu by pressing 'return'. Is this also how you do it? If not, the exact navigational commands you use would be helpful.
However, once the popup menu is open, I cannot figure out how to interact with it. Are there any examples of Trimps menus you've been able to navigate, so I can learn from and copy them?
One last question: Please complete the Bionic Wonderland III map if you haven't yet, because it will unlock the AutoStructures buttons which will help our tests. :-)
Well, to be honest I've sort of stepped back because games are supposed to be fun and my dayjob is where I get paid to debug tons of things. I do know/use git and I will try to find time to look at this in the next few days, but I'm probably not going to want to play a lot further unless we see something land upstream. In particular I don't think I have a save capable of doing BW 3, so I can't make that happen quickly. I imagine I/we could edit saves, or you can give me one and I'll use an incognito browser, but I won't have time to do anything with this until the weekend at the earliest.
I can't really give you instructions on interacting with this stuff. For example, a lot of trimps just doesn't have tabIndex at all. Broadly speaking trimps pop-ups have separators, which means you can get to them with the s key; failing that you can go to the bottom of the page (ctrl+end) and go up one heading and it's usually right "above" overview. If this seems less than ideal, it is. I don't know why things are the way they are, which is one reason I'm hesitating to just go whole hog on making changes myself. Given the abundance of low-hanging fruit and the fact that this dev is/was well-known for being involved when it comes to accessibility, I imagine there's a good reason why it hasn't been plucked, and so I haven't tried going after it (also do they even accept prs? Not clear on that either, being as there is a commercial version...)
Describe the bug A clear and concise description of what the bug is.
There's a button to toggle autojobs, but there's no button to get to the settings for it. I'm using NVDA and Chrome.
To Reproduce Steps to reproduce the behavior:
Expected behavior I'd expect "autojobs off/on" to be followed by a settings button. Alternatively to have a settings tab. A hotkey might also be nice. I checked all three of these places, as well as a bunch of screen reader stuff so hopefully I didn't miss something obvious.
Screenshots If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
Additional context Add any other context about the problem here.