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

Add keyboard accessibility to code block #309

Merged
merged 1 commit into from
Jun 6, 2023

Conversation

EmmaDawsonDev
Copy link
Member

Describe your changes

Added a ref to the Pre block in the react syntax highlighter so that scrollbars can be detected. Adds a tab index when scrollbars are present in order to allow keyboard users to scroll horizontally.

Screenshots - If Any (Optional)

Link to issue

Closes #306

Checklist before requesting a review

  • I have performed a self-review of my code.
  • Followed the repository's Contributing Guidelines.
  • I ran the app and tested it locally to verify that it works as expected.
  • I have checked my code with an automatic accessibility tool such as Axe Dev Tools or Wave
    and it shows no errors.

Additional Information (Optional)

Any additional information that you want to give us.

@EmmaDawsonDev EmmaDawsonDev self-assigned this Jun 6, 2023
@EmmaDawsonDev EmmaDawsonDev merged commit a569e8e into main Jun 6, 2023
@EmmaDawsonDev EmmaDawsonDev deleted the fix/code-block-scroll branch June 6, 2023 14:04
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.

Code block needs keyboard access
1 participant