-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should keyboard navigation loop in the simulation? #121
Comments
@jessegreenberg In instance 10, on the Surface Pro 3, the user actually got stuck on the Reset button. I am not sure why, but it happened a few times. When he got stuck, he was actually stuck. He couldn't go forward or backward. He hit TAB and he just heard "Reset" again and then if he hit Shift-TAB, he heard "Reset" again. To get unstuck, the user changed navigational strategies. In a couple of cases he switched to ARROW keys to get away from the Reset Button (and that worked) and in one other case he used the JAWS command "B" to go to the next Button. In that case, virtual focus wrapped to top and landed on the Yellow Balloon (which is a button in instance 10). What I think should happen if the user TABs beyond (forward from) the Reset Button is that their focus should go to the browser because they are at the end of the Sim. This seemed like a problem in my first interview, but I think it seemed like a problem at the time for other reasons. Eventually, tabbing past the Reset Button will take the user into the footer of the sim page or to the other Tab Navigation for the other sim pages on a multi-screen simulation. |
Thank you for describing what happened! I will investigate this, see if I can reproduce on one of our platforms. For your description of the way tab navigation should eventually behave, I completely agree. That makes sense to me, and that navigation would be the default for the browser. I don't think the user would encounter any surprises with that behavior. |
One thing I noticed when testing with JAWS and IE is that the focus seems to get stuck around the 'Add wall' and 'Reset Balloon' button. Focus moves around to the correct HTML element, but description and keyboard event callback are stuck on one of these two buttons. It is as though the virtual cursor is getting out of sync with the HTML focus. |
It looks like there is an issue with the structure of these inputs. These inputs have children, which is not valid HTML. Since none of the label text is visible, I think it should be acceptable to replace the paragraph descriptions with an Ideally, these buttons would be represented with something like: <div id='button-container-id>
<input type='button' value='Button Label' aria-describedby='description-id'>
<p id='description-id>Button Description</p>
</div>
This is tricky with scenery because the node must be represented by the input element to receive the focus highlight correctly. The above structure is possible, but it requires some sim side complexity. Currently, the button looks like this: <input type="button" value="Reset Balloon" aria-describedby="reset-all-description-17-42-423-468-462-459">
<p id="reset-all-description-17-42-423-468-462-459">Select to Reset Balloon to initial position and an uncharged state.</p>
</input> But it could be represented with: <input type="button" value="Reset Balloon" aria-label="Select to Reset Balloon to initial position and an uncharged state."> This would simplify things significantly. |
Another possibility could be the following, assuming role=button is handled correctly <div id='button-container-id tabindex="0" aria-label="Button Value" aria-descrbedby='description-id' aria-role="button">
<p id='description-id>Button Description</p>
</div>
This is my favorite. It allows us to nest labels and descriptions as desired, and the parent div receives focus. This is how rectangular push buttons should be represented. |
One downside is that 'click' event is no longer handled by default. We need to handle |
It looks like 'click' is actually supported for many platforms with the button role: But it it not predictable, there is no common event across browsers for the button role. Firefox and OS devices do not support it. If the behavior is mimicked, NVDA requires that the user be in forms mode to even use the buttons. Even though it is recommended by the W3 (https://www.w3.org/TR/2015/WD-wai-aria-practices-1.1-20151119/examples/button/button.html#) Unobfuscated Blogspot source suggests that buttons NOT be represented with divs. I agree, and we are back to <input type="button" value="Reset Balloon" aria-label="Select to Reset Balloon to initial position and an uncharged state."> |
Button name is ignored by screen reader with this representation. No need for this to be an input, perhaps something like <button aria-label="Select to Reset Balloon to initial position and an uncharged state.">Reset Balloon</button> |
Again, the |
What we really need is to to add a feature to the scenery API that allows us to create a structure like: <div id='button-container-id>
<input type='button' value='Button Label' aria-describedby='description-id'>
<p id='description-id>Button Description</p>
</div>
The node itself is represented by the input, but it can exist in a container element that will hold descriptions, labels, or other content for the screen reader. This has been required in several cases outside of this issue. |
I will test the structure suggested in #121 (comment) in balloons-and-static-electricity to see if this solves issues with JAWS and getting stuck on input elements with children. If it does, this structure should be supported by scenery. |
@jessegreenberg, I think we may still need an aria-label on the
I'll be more active after Friday. |
@terracoda I think you are correct, the label will be required. <div id='button-container-id>
<input type='button' aria-label='Button Label' aria-describedby='description-id'>
<p id='description-id>Button Description</p>
</div>
would be fine. I was hoping that we could streamline the DOM element into a single line (like #121 (comment)), which meant using both the content node for a label and an |
Revisiting this issue, can no longer get stuck on elements. I have not made any changes yet, I am not sure why I can no longer reproduce this issue. |
…d under container structure, see #121
…description updates, see #121
Buttons now structured as described in #121 (comment), with the Working great with NVDA in a few browsers, testiing JAWS next. |
JAWS seems to work very will, tested in both IE and Firefox. Live regions working very well too 👍 Closing. |
@jessegreenberg, I see you tried a regular button tag. That should work as a single line DOM element if one doesn't need a description, right? Were there other issues with just using a button?
and this might also be possible when a description is not necessary
Sorry I am a bit late to the discussion. |
Yes, that is correct. Right now the button is represented as a single line if no description is necessary, like <input type='button' aria-label='Button Label' aria-describedby='description-id'> and nested in a div if the description is necessary. As for whether to use an input element or a button, they seem to behave the same across screen readers. No values are submitted from button elements in the parallel DOM, so we don't have to worry about behavior differences between |
@jessegreenberg, the |
Sounds good @terracoda, I will change to use a native button. This change will need to be done in sun. |
Done, all buttons (including toggles) use |
From #116, @terracoda mentioned that
I am not sure if it id desirable for the navigation to loop through the sim. This could be annoying to a user that is counting on 'tab' to leave the simulation area and get back to the browser interface.
@terracoda were users able to 'shift tab' to get away from the button?
The text was updated successfully, but these errors were encountered: