Howdy, Stranger!

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

Possible odd behaviour of Twine 2: it gives focus to active links

Hi,

Maybe this is a bug, or maybe it is a feature. But I was aware that twine give a strange halo, a border to my active links, when I have all around my css code giving my own border or not border at all. You can test the thing in any twine 2 game, in chrome and firefox, if you clic a link and hold the button, you will see an outline. And that is the css rule, outline. I've used this code to negate that effect:

tw-link:focus:active {
outline: none;
}

Focus is used for accessibility, you can test it using TAB at your twine game, but it is weird to use focus on an active link, so that is, better say this, because maybe is it a bug?

Regards,

Ruber.

Comments

  • edited August 2016
    The point of focus on an active link is to highlight what link has just been clicked, so not really a bug.

    It's fine to disable it, though. While it makes your game less accessible, that's a personal game development choice.
  • The 'halo' effect around the current element that has focus is generally setup by the web-browser's in-built default stylesheet, this is generally done as part of a web-browser's Accessibility support.
  • Claretta wrote: »
    It's fine to disable it, though. While it makes your game less accessible, that's a personal game development choice.

    No, with that code you can still use TAB to select links. That code just disable that active links get the focus. In my game, and in most games in Twine that is not a problem because hook links just disappear and tw-links proceed to another node, so, it has no sense to give focus to a departing link.

    And I repeat myself, that code does not disable focus, you can still TAB them.

    Ok, I forgot to include hooks in the code.
    ttw-link:focus:active, tw-enchantment:focus:active  {
      outline: none;
    }
    

    Anyway, thank you for the clarifications.
  • edited August 2016
    The purpose of that is to show people with bad eyesight what link that just clicked. It's still an accessibility feature, not a bug.
Sign In or Register to comment.