Skip to content
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

Disable keyboard navigation for AC and AC virtual lab #656

Closed
samreid opened this issue Jan 21, 2021 · 4 comments
Closed

Disable keyboard navigation for AC and AC virtual lab #656

samreid opened this issue Jan 21, 2021 · 4 comments
Assignees
Milestone

Comments

@samreid
Copy link
Member

samreid commented Jan 21, 2021

@jessegreenberg pointed out that AC should not be keyboard accessible yet, it probably needs this snippet:

// Support accessibility for deleting selected circuit elements, but don't support broader tab navigation until it
// is complete
document.addEventListener( 'keydown', event => {
  const keyCode = event.keyCode || event.which;
  if ( keyCode === KeyboardUtils.KEY_TAB ) {
    event.preventDefault();
  }
} );
@samreid samreid added this to the AC 1.0 milestone Jan 21, 2021
@samreid samreid self-assigned this Jan 21, 2021
@samreid
Copy link
Member Author

samreid commented Jan 21, 2021

To make this work @jessegreenberg points out they will also need "supportsInteractiveDescriptions": true in package.json.

samreid added a commit to phetsims/circuit-construction-kit-ac-virtual-lab that referenced this issue Jan 27, 2021
samreid added a commit to phetsims/circuit-construction-kit-dc-virtual-lab that referenced this issue Jan 27, 2021
@samreid
Copy link
Member Author

samreid commented Jan 27, 2021

Fixed in the commits and seems to be testing OK on my system. @jessegreenberg can you please review or spot check as you see fit?

@jessegreenberg
Copy link
Contributor

This looks good to me and I tried to test to make sure it works. I tried CCK:AC, CCK:DC, CCK:AC Virtual Lab and CCK:DC Virtual Lab. For all of them I could delete components by pressing the "backspace" key, but I was not able to tab around the sim.

@samreid
Copy link
Member Author

samreid commented Jan 27, 2021

Thanks @jessegreenberg! Closing.

@samreid samreid closed this as completed Jan 27, 2021
samreid added a commit to phetsims/circuit-construction-kit-ac-virtual-lab that referenced this issue Feb 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants