Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Screen Reader Help

Hello, I am new to Twine. As I am blind I use a screen reader to use the computer. I have been able to make trial stories OK, except for one annoying feature. As I progress through stories via the links, each page has the created by Twine etc at the start. Is there a way of turning this off after the first page?


  • I wrote a small test case which inserts the aria-hidden attribute on the credits if the passage is not named "Start".

    If this works well, we should probably add it to the story format headers, so every Twine story will have the same behavior.

    The code follows:

    :: StoryTitle
    Screen Reader Credits Test

    :: Hide Credits [script]
    //requires jquery
    prerender.hideCredits = function(passageElem) {
    if (this.title != "Start") {
    $("#credits").attr("aria-hidden", "true");

    :: Start

    [[Next|Section Two]]

    :: Section Two
    This is the second section.

    [[Next|Section Three]]

    :: Section Three
    This is the end of the test.
  • Hi, Thanks for your reply. Sorry for delay in answering but had trouble repling. Anyway I was not sure where to put the code. In the end I pasted it into Start. I made the missing links. Is this the correct place to put the code? It did not appear to work, but I have just thought of something I may need to try. Will test it again and report back.
  • The example code block contains several passages: "StoryTitle", "Hide Credits", "Start", "Section Two" and
    "Section Three". The passage title is preceded by a double colon; this is the Twee syntax, the command line version of Twine. The essential part is the JavaScript code in the "Hide Credits" passage that must be tagged as "script" so it will be executed when the story loads. Putting it in the "Start" passage won't work, since Twine treats the JavaScript as story text instead of script then.

    I don't know how code comes out of a screen reader, so I attached the Twee source to this post as an alternative format. You can load it into a Twine project using "File", "Import", "Twee Source Code...".

    There was a web site outage on Monday, but the compiled version of the test is now back online here.
  • Hello again, I adapted the code and got it working in my story, and it works fine. It would also be useful if the Author could also be supressed, as you do not need that repeated on every page. The title is fiine as it tells you that you have not lost focus on the story. It would be good to have the code built into Twine so that all can benefit. Once again thanks for your help.
Sign In or Register to comment.