2023 Grant Report: “Accessible IF on iOS” (Dannii Willis)
December 13, 2024
by Grants Admin Committee
Dannii Willis has been the main developer of the open source tool Parchment for a very long time (has it been 15 years already?). Parchment is a very cool interpreter for parser games, allowing anyone to play the games directly in the browser. Dannii applied in 2023 for an IFTF microgrant, asking the organization to cover the price of acquiring a used iOS device; this would allow him to test the Parchment interpreter on real hardware himself, which would lend itself to faster iterations. Dannii was also in particular very interested to test the compatibility of Parchment on iOS with UserVoice, and try to push the envelope around accessibility features for blind or low-vision players.
We just received his report, which has great detail on the project and the work he accomplished using the iOS device he was able to acquire with our support — work for Parchment, but also on other cool projects! Hope you enjoy reading this!
Thanks to the IFTF grant I was able to purchase a refurbished iPhone 13, which has allowed me to test and resolve some significant issues with Parchment.
First, some virtual keyboard improvements: mobile phones and tablets are commonly used via virtual keyboards. While on most websites these work smoothly, they pose a problem for an app like Parchment which wants to adjust itself to fit perfectly in the remaining visible screen space, so that the status window etc will still be visible. Unfortunately browsers don’t act the same way with their virtual keyboards, so keeping a consistent user interface for both iOS and Android is difficult. In late 2022 Chrome introduced a meta tag for specifying which behaviour an app wants. Firefox added support for it in 2024, but Safari still doesn’t support it. In addition, while Safari does support the VirtualViewport API, which allows you to be notified when the virtual keyboard is opened or closed, its resize events are quite delayed, up to 700ms, which feels very sluggish. With my iOS testing device I was able to find solutions for these problems, so that Parchment now has a very smooth and responsive interface on all browsers.
The next two projects haven’t been added to the stable version of Parchment yet, but have been shared for testing. As part of a major comprehensive update to Parchment, I have developed a new file system and dialog. Similarly to the general virtual keyboard updates, it needed a little bit of special care to get working in iOS. Second, I have finally added sound support to Parchment! The Glk API that Parchment is built upon supports three sound formats, AIFF, Ogg/Vorbis, and MOD. Unfortunately Chrome doesn’t support AIFF, and Safari doesn’t support Ogg/Vorbis! (None of them support MOD, though MOD files are also rarely used, so for now I’m not intending to support them in Parchment.) I have added a small audio decoding library into Parchment so that AIFF and Ogg/Vorbis can be supported in all browsers.
And I have also used the iOS device for a bonus project: Infocom Frotz! This isn’t part of Parchment, but seeing as I used my iOS test device to work on it, I’ll mention it too: this year I ported Frotz to the web, finally allowing Infocom’s multimedia (sound/graphics) games to be played online. Infocom’s version 6 of the Z-Machine was a big departure from its earlier versions, and so even today it is only supported by some Z-Machine interpreters. Its window model is not compatible with the Glk model that most interpreters now use, and so playing Infocom’s Z6 games has required a stand-alone Z-Machine interpreter rather than the multi-interpreters the community usually recommends (Gargoyle, Lectrote, Spatterlight, or Parchment). But just because the Z6 model doesn’t fit our modern Glk model doesn’t mean that interpreters like Frotz aren’t high quality. Frotz already has an SDL version, and Emscripten, which I’ve been using for years to port the Glk interpreters for Parchment, also supports SDL. So it didn’t take a lot of effort to build Frotz with Emscripten, thereby allowing the Z6 model to finally be supported on the web. It still needed some extra polishing, most notably that Emscripten’s version of SDL doesn’t support mobile virtual keyboards. But I have a lot of experience with that! And of course, there were more viewport issues in iOS.
The test iOS test device helped me accomplish a lot this year that I couldn’t have effectively tested otherwise. Even though the year is over I of course won’t be getting rid of the phone. So you can expect at least one more end of year report from me. Will Safari finally add support for the interactive-widget viewport meta tag? I can only hope so. See you then!