Keyboard Accessibility in Inform 7?

slides in from the Twine category

Hi, everyone. I’ve been digging into Inform 7’s documentation and it looks like a fun/powerful development tool. Unfortunately, I am a blind developer and I’m having some issues with pieces of the application. I can get to the menu bar and the editor just fine, but I was wondering if there were any keyboard shortcuts from the tabs at the top of each panel (Go, Replay, Index, etc). At present, I would have to randomly move my mouse around until I manage to not only hover over one, but also have the fortune that my screen reader says the name in before I pass over it. (Awkward, as you can imagine)

I’ve asked Google, but it mostly just leads me to parts of the documentation that mention player input. Anybody have any helpful tips or anything I could look forward to?

If you press and release Alt, can you use the arrow keys to navigate the menus? Are those readable by a screenreader? (Hrm. I should fire up NVDA and just try it.) But I think everything is in the menus.

Go (F5), Replay (F9), and Release are buttons. They’re on the row below the menus. Then the screen is divided into two panes (left and right), each of which can display Source, Results, Index, Skein, Transcript, Story, Documentation, Extensions, or Settings tabs. The Window menu lists those key shortcuts (show tab) as Ctrl-F1 through Ctrl-F9.

You can go to either pane: left with Ctrl-1 and right with Ctrl-2, or toggle between panes with F6, though maybe that’s less useful to you?

Once you’ve built your story, Ctrl-3 through Ctrl-9 and then Ctrl-0 access the sections of the story index (that’s the index tab that you get with Ctrl-F3): Home, Contents, Actions, Kinds, Phrasebook, Rules, Scenes, and World.

4 Likes

Thanks so much! I could get to the top menus using alt, but I suppose I missed the keyboard shortcuts while scrolling through them too quickly. These do work and should be enough for me to get started trying it out.

1 Like

Oh. Apparently F2 and F3 take you to the “search source code” and “search documentation” input boxes, respectively. Those bring up a separate window listing all the results.

Also wanted to say that I know there are at least a few blind people using Inform 7, so don’t give up, it’s possible. I remember one of them saying that the natural-language syntax was much nicer for a screen-reader than traditional programming languages, and that the biggest problem was that you can’t see the syntax highlighting, so finding misplaced quotes or brackets is a bear.

3 Likes

I’m glad to hear that other people have had success. And yes, coming from coding increasingly advanced JavaScript in Twee notation, it will be definitely be interesting to note how much easier it might be to understand my own code read back to me. Sometimes when you’re hearing four 'left peren’s in a row, the brain starts to drift and can be difficult to notice there’s a quotation missing. My punctuation setting in NVDA still doesn’t report commas or single quotes while reading, but that’s something I’m already used to dealing with.

So, thank you again. I’m sure I’ll be back later with more questions, and then eventually to try answering a few. :slight_smile:

2 Likes

I’m deaf, a different issue, but on the last question, I don’t known zilch :wink: about how screen reader are configured, but (being deaf I can’t suggest the best method…) is possible to configure the reader to switch to a different tone/voice when meets a quoted text ? I guess that in this case hearing, say “west of the bridge is a room named…” with the quoted text tone/voice should be a clear pointer to missing quotation.
(for whom can both see and hear: I think that differentiating tones/voices should be akin to differentiating colours in the syntax colouring)

Best regards from Italy,
dott. Piergiorgio.

The last time I looked into it, none of the screenreaders paid any attention to color, font, or bold/italics/underline at all. I’m not sure if that’s a technical limitation (the accessibility APIs don’t tell the screenreaders about color/font/style) or just that it would make things too busy. The NVDA User Guide now mentions color, font name, size, etc., so maybe it’s possible and just turned off by default? That could possibly solve the problem for Inform 7, since it uses syntax highlighting so lightly.

I haven’t found anything in regards to color/font/etc. in NVDA’s settings. I imagine the limitation is a combination of the reasons you listed above. The pitch change options are for capital letters, and that’s only when the user is navigating letter by letter. I could also set it to report all punctuation so it would read out commas, single quotations, and periods, but that would quickly become overwhelming and difficult to understand. (It would also read apostrophies in the middle of words, for example)

All in all, I don’t think it will be too much of an issue. I’m used to just running my code and following syntax error reports, and Inform 7 is quick to tell you if something isn’t right when you try to compile the game.

The one thing I’m noticing, however, is that play testing is tricky. There’s one more method I want to try (using NVDA’s review cursor) but otherwise it’s the random mouse movement method again because you can’t escape the command prompt to look at what the story says. It’s not set up to be a “live” field, so the screen reader doesn’t notice the changes.

EDIT: Nope, review cursor doesn’t work. It thinks I’m trying to look at the last panel that was open, not the game. The game is running and I can type in the command prompt, but the review cursor is reading me the documentation panel.

EDIT 2: …And now it’s inexplicably working. I have no idea what I did to change its focus, but I can move through the story using the review cursor. Maybe I just have to click on it? I’ll have to play around with it more, but for any other blind people who happen upon this thread, it is - somehow - possible.

1 Like

Hi all,

I’m a blind software developer who picked up Inform 7 a few years ago, and to be sure the syntax is a refreshing break from twisty little punctuations!

As people very helpfully pointed out above, the program has great keyboard access, and should you forget any of the commands, they are read when scrolling through the menus, if you have your screen reader configured to allow that.

It may be system dependent, but I am able to switch between the source and story tabs with CTRL+F2 and CTRL+F6, respectively. I am also able to interact with the story tab using the NVDA object navigator and review cursor.

If you’re having problems with things not focusing, remember to route your object navigator and review cursor to your system focus. Because of technical blah-blah-blah, the various methods of focus NVDA employs are not always synced up. Inform is not designed as a screen reader-accessible program, so a screen reader has to be conservative about the decisions and guesses it makes when presenting the user interface.

When you jump tabs in Inform, the NVDA cursors may not follow. You can sync their positions with the command referred to in documentation as:

Sets the navigator object to the current focus, and the review cursor to the position of the caret inside it (if possible).

The keyboard shortcut you use to do this may vary depending on your configuration, by default it is NVDA+BACKSPACE. I’m not sure what a user of another screen reader might do, but I know JAWS at least has something like the NVDA object nav system.

As pointed out above, however, the text in the story command prompt is not dynamically sent to a screen reader, so at present we will all have to use the cursors. Perhaps there will be more discussion on improving accessibility for the community when the process of open sourcing is completed, though the source code for the Windows interface is already available.

As for syntax highlighting:
Most screen readers, NVDA included, have a comprehensive way of reporting formatting of all kinds. Unfortunately, because of the way the Windows interface is currently coded, NVDA can’t detect formatting changes in the source document. It may be an issue of custom class, or just the wrong kind of document altogether, but for whatever reason, Inform doesn’t expose that information to NVDA. Not sure about others.

I’m glad to discoverI’m not the only blind Inform programmer out there! I am familiar with IF, but new to the community, and my first post is here. I hope it helped!

7 Likes

Hi! Glad to meet you and thanks for the F2 tip. I’ll give that a try next time I boot up/test a project. I’m still in the “What’s this do? What’s that do? Oops, broke it. What’s this do? Oh god where am I?” phase.

And if a discussion about accessibility does start in the future, I’ll be happy to be involved. I just, uh… fail to notice things sometimes.

1 Like

Whoops, you’re quite correct, F2 not CTRL+F2!

Don’t worry about it, that’s the best phase. IN my opinion you haven’t fully learnt something like programming until you’ve discovered all the ways it can go wrong.

Be sure to check out the documentation, it is one of the best pieces of instruction material I’ve ever read, and even with experience I find it an invaluable resource.

The format is a bit clunky with a screen reader, and I’d recommend reading it outside of the program, unless you want to wait a hundred years for it to respond to each key-press. There’s an EPUB eBook version which I’m currently in the process of refactoring, because the markup is all wrong and makes the file a chore to navigate in software. I’ll toss you a copy when it’s done, if you like.

I’ll also be happy to answer any further questions on accessibility and workarounds.

Best of luck and enjoy!

Oh, I spent like two days going over a lot of the documentation on the website before I even downloaded Inform. lol It was fun to read about all the things it could do. Now I’ll have to go back through it again in order to retain more as I’m actually working with it.

I’m not familiar with using ePub documents, but if it’s easier to navigate, I’ll give it a shot.

Also, I think it is Ctrl+F2 as you said. I was just being lazy while typing. I think just F2 is the search source feature.

And I agree: I’ve learned a lot by breaking everything, tearing my hair out in frustration for a while, then finally discovering the solution in a sudden burst of realization. I usually find the high worth the low-key rage. :slight_smile:

1 Like

I get so used to jumping around in there that I forget what I’m physically doing most of the time! :slight_smile:

Just checked the solution, it’s CTRL+F1 for source, and you were right, F2 and F3 are search source/documentation, respectively.