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

Keyboard accessibility improvements to the micro:bit simulator. #6113

Conversation

glastonbridge
Copy link
Contributor

Provides the following accessibility improvements in the micro:bit simulator:

  • re-structures the DOM so that tab ordering of simulator elements is left-right top-bottom (see videos)
  • makes the antenna element interactive using keyboard navigation, simplest approach
    • previously it was an invisible tab stop
  • add some preventDefaults to prevent the screen scrolling while you're adjusting values when the simulator has a scrollbar

Old behaviour

Sequential tabbing through the simulator using the tab key

Screen.Recording.2025-03-13.at.13.44.05.mov

New behaviour

Screen.Recording.2025-03-12.at.16.05.10.mov

You can try it here.

Example project (needs JavaScript copy/pasting to correct deployment).

- re-structures the DOM so that tab ordering of simulator elements moves
  left-to-right and top-to-bottom.
- Makes the antenna element interactive using keyboard navigation, simple
  approach. Previously an invisible tab stop with no keyboard interaction.
- Add preventDefault to keyboard actions to prevent scrolling when setting
  values when the simulator is inside a scrolled container.
@glastonbridge
Copy link
Contributor Author

@microsoft-github-policy-service agree company="Micro:bit Educational Foundation"

@microbit-matt-hillsdon
Copy link
Contributor

For context, Alex (@glastonbridge) is working with the micro:bit team on MakeCode accessibility and integrating Blockly keyboard navigation. As the sim is between the toolbar and the workspace in tab order it’s really helpful to get a logical sequence in place.

Copy link
Contributor

@thsparks thsparks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for tidying all this up. Makes the code much easier to read. The changes look good to me!

@thsparks thsparks merged commit 5fe19c4 into microsoft:master Mar 26, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants