bobtheuberfish / chiriboga

Implements Netrunner in Javascript against an AI opponent
https://chiriboga.sifnt.net.au/
GNU General Public License v3.0
86 stars 11 forks source link

Screen Reader/Accessibility Improvements #136

Closed BlindGuyNW closed 10 months ago

BlindGuyNW commented 1 year ago

Hi there,

I just discovered Netrunner recently and was happy to see a couple interesting digital tools to learn it, including this one. However, at the moment the current UI is not very accessible with my screen reader. The canvass element doesn't expose any accessibility information, though I can read some of the in-game text with OCR.

I was pleased/surprised to see the "Narrate AI," checkbox, which seems to use TTS to explain what the AI is doing on each turn, which is very useful for my purposes.

I am a web accessibility tester, though lack much development experience. It looks like this is largely PHP and Javascript. I was doing a brief poke through of the DOM and found a form for inputting text commands, though it obviously isn't exposed at the moment.

I wanted to open this issue to brainstorm ways to improve this situation. I know it's a weird ask, but would appreciate any thoughts.

Also, on a semi-related note, where do I get the card images? I don't really need them, except the engine appears to fail if it can't find them.

Thanks for any help. :)

bobtheuberfish commented 1 year ago

Thank you for these comments. Probably the reason why text input exists is because when I first started this project it was a command line game with no UI. At that point in development every move option was entered as a command or selected from a numbered list.

In theory you could still play it this way from the browser console but in practice there are some considerable issues with it right now. For example you can take basic actions with Execute("gain") (spends a click to gain a credit) but often the action is represented by "n" (a catchall for continue/do nothing). You can view other available options with validOptions and select from that list using ResolveChoice(index) e.g. ResolveChoice(0). Each option in the list is supposed to have a unique description but there are many areas of the game where this is not the case. We could work together to find and fix these. Also the browser console currently reports a lot of extra text because it is used for debugging the AI behaviours. We could work to improve this, too.

I can try to reimplement a text-only interface for the game, if you think that's a good approach? I could even add additional commands that you think would be helpful (feel free to suggest).

The card images can be found here: https://chiriboga.sifnt.net.au/images_sg_su21_ms.7z

BlindGuyNW commented 1 year ago

Hi,

Thanks for getting back to me. 😊

Reimplementing a text UI seems to be the most straight-forward option on the surface, easier than trying to make the canvass accessible. That would pretty much require adding a bunch of alternative content anyway, see this page https://pauljadam.com/demos/canvas.html for some details.

I struggled a bit with the browser console just now, so any work you could do to improve either that or preferably just make the text UI available without needing to open it would be appreciated.

Thanks again,

Zack.

From: bobtheuberfish @.> Sent: Tuesday, April 18, 2023 5:11 PM To: bobtheuberfish/chiriboga @.> Cc: Zachary Kline @.>; Author @.> Subject: Re: [bobtheuberfish/chiriboga] Screen Reader/Accessibility Improvements (Issue #136)

Thank you for these comments. Probably the reason why text input exists is because when I first started this project it was a command line game with no UI. At that point in development every move option was entered as a command or selected from a numbered list.

In theory you could still play it this way from the browser console but in practice there are some considerable issues with it right now. For example you can take basic actions with Execute("gain") (spends a click to gain a credit) but often the action is represented by "n" (a catchall for continue/do nothing). You can view other available options with validOptions and select from that list using ResolveChoice(index) e.g. ResolveChoice(0). Each option in the list is supposed to have a unique description but there are many areas of the game where this is not the case. We could work together to find and fix these. Also the browser console currently reports a lot of extra text because it is used for debugging the AI behaviours. We could work to improve this, too.

I can try to reimplement a text-only interface for the game, if you think that's a good approach? I could even add additional commands that you think would be helpful (feel free to suggest).

The card images can be found here: https://chiriboga.sifnt.net.au/images_sg_su21_ms.7z

— Reply to this email directly, view it on GitHub https://github.com/bobtheuberfish/chiriboga/issues/136#issuecomment-1513932975 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AANWY4YEJ3S5L5OSUTXTDUTXB4UPPANCNFSM6AAAAAAXDB4GBQ . You are receiving this because you authored the thread. https://github.com/notifications/beacon/AANWY4YI6FJXQQGTXWTCU53XB4UPPA5CNFSM6AAAAAAXDB4GBSWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTS2HTEK6.gif Message ID: @. @.> >

bobtheuberfish commented 1 year ago

Thank you for your response. I will look into this.

bobtheuberfish commented 1 year ago

Hi, I have created a first attempt at a text-only interface. I decided to go with buttons rather than a command line because there are usually a quite limited number of options to choose from. I have tried to list card properties like counters where possible but I probably have missed some obvious things so I am expecting a lot will need to be improved. Please note that ice positions are numbers from 0 (innermost) to N minus 1 (outermost). Here's the link.

BlindGuyNW commented 1 year ago

Hi there,

This is promising, but one thing I don’t seem to know how to do right away is look up the card info. That is, I don’t know what a card does without looking it up by name I, NRDB. Is this available to sighted players?

Thanks for the work on it 😊

From: bobtheuberfish @.> Sent: Sunday, July 9, 2023 1:31 PM To: bobtheuberfish/chiriboga @.> Cc: Zachary Kline @.>; Author @.> Subject: Re: [bobtheuberfish/chiriboga] Screen Reader/Accessibility Improvements (Issue #136)

Hi, I have created a first attempt at a text-only interface. I decided to go with buttons rather than a command line because there are usually a quite limited number of options to choose from. I have tried to list card properties like counters where possible but I probably have missed some obvious things so I am expecting a lot will need to be improved. Please note that ice positions are numbers from 0 (innermost) to N minus 1 (outermost). Here's the link. https://chiriboga.sifnt.net.au/dev/engine_text.html

— Reply to this email directly, view it on GitHub https://github.com/bobtheuberfish/chiriboga/issues/136#issuecomment-1627817850 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AANWY45K4OWEKW634VF6DDTXPMIJ5ANCNFSM6AAAAAAXDB4GBQ . You are receiving this because you authored the thread. https://github.com/notifications/beacon/AANWY4ZSXOXDOBUM7EDVQEDXPMIJ5A5CNFSM6AAAAAAXDB4GBSWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTBA2DXU.gif Message ID: @. @.> >

bobtheuberfish commented 1 year ago

In Chiriboga there is no card text data (the sighted version just has images in the canvas). I can look into copying it across from NRDB? If I can do this, how would you like to be able to access the data while playing Chiriboga? I can add an autocompleting input field which you can type in to lookup cards?

BlindGuyNW commented 1 year ago

Hi,

Some kind of input field seems like a reasonable idea. Knowing it’s not available for anyone makes it a little less irritating in general. 😊

I just played and got myself utterly dismanteled by the AI runner, so I think it’s going well so far.

From: bobtheuberfish @.> Sent: Sunday, July 9, 2023 6:27 PM To: bobtheuberfish/chiriboga @.> Cc: Zachary Kline @.>; Author @.> Subject: Re: [bobtheuberfish/chiriboga] Screen Reader/Accessibility Improvements (Issue #136)

In Chiriboga there is no card text data. I can look into copying it across from NRDB? If I can do this, how would you like to be able to access the data while playing Chiriboga? I can add an autocompleting input field which you can type in to lookup cards?

— Reply to this email directly, view it on GitHub https://github.com/bobtheuberfish/chiriboga/issues/136#issuecomment-1627915259 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AANWY4ZA6H5Q433BHQJ6GLTXPNK4TANCNFSM6AAAAAAXDB4GBQ . You are receiving this because you authored the thread. https://github.com/notifications/beacon/AANWY45FZNZZROPP2IPWYELXPNK4TA5CNFSM6AAAAAAXDB4GBSWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTBBAB7W.gif Message ID: @. @.> >

bobtheuberfish commented 1 year ago

I've added a card search input. Please try it again and let me know how it goes.

bobtheuberfish commented 10 months ago

This issue has been inactive for a few months so I am going to close it. Feel free to open a new issue if needed.