Skip to main content
Participating Frequently
October 19, 2018
Question

Variable not incrementing properly with tab/enter usage for 508 compliance

  • October 19, 2018
  • 1 reply
  • 943 views

I'm having a problem with a variable not incrementing properly when using Tab and Enter (for 508 compliance) to navigate through a page. The page in an interaction where the user has to select multiple items and then click a Submit button to get it correct. After the first incorrect try they get one feedback and after the second incorrect they get a different feedback box appearing. Everything works fine when using the mouse or the shortcut keys I defined for the input. The problem arises when the user uses the tab and enter key combination. If they get it right on the first try, everything works as it should. However, if they get it wrong, it immediately shows the second feedback option.

I'm using a variable to count the incorrect. I've tried the increment (increase by 1) and expression (var = var + 1) but neither seem to make a difference with the tab/enter method. Have any of you had this issue and know how to deal with it?

    This topic has been closed for replies.

    1 reply

    RodWard
    Community Expert
    Community Expert
    October 19, 2018

    To debug this you will need to be able to get a better handle on where it is failing.

    Insert a Smart Shape somewhere on the slide and insert the variable into that shape (timed for rest of slide) so that you can always see the variable's current value.  Then publish and test the interaction slide again.  You should then be able to see where the variable is or is not being incremented.

    You may find that there is a point where the increment action is NOT being executed as expected. 

    Participating Frequently
    October 19, 2018

    I did that and when using the tab/enter combination it goes straight from 0 to 2. Using the defined keyboard shortcuts and mouse it goes from 0 to 1 and then to 2 on the second error.

    My thought is perhaps clicking the enter key does something, but I can't find where or why that's happening.

    RodWard
    Community Expert
    Community Expert
    October 20, 2018

    Seems to me like it's executing the increment action twice.  Once for Tab and once for Enter.  What happens if you don't use Tab and just use your mouse to get to the next TEB?  Does it then increment once?