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

Tiny tweak: use <kbd> instead of <span class="keystroke"> #3929

Closed
chriskrycho opened this issue May 17, 2024 · 0 comments · Fixed by #3945
Closed

Tiny tweak: use <kbd> instead of <span class="keystroke"> #3929

chriskrycho opened this issue May 17, 2024 · 0 comments · Fixed by #3945

Comments

@chriskrycho
Copy link
Contributor

This is a small change which will give improved accessibility for the handful of places we use <span class="keystroke">, e.g. <span class="keystroke">ctrl-c</span>. Right now, there is no CSS or anything associated with that, and since it is just a span with no other information, screen readers won’t make anything of it either. Using <kbd> will automatically get reasonably good styling—GitHub is a little different, but gives a good idea of how it can look: ctrlc. Then screen readers can expose that (or not!) as they choose, but it at least conveys the appropriate semantics. To land it, we will also need to update the existing code which strips out those spans.

chriskrycho added a commit that referenced this issue May 27, 2024
This has some reasonably nice built-in presentation in modern browsers,
and may also yield a small accessibility improvement.

Fixes #3929
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 a pull request may close this issue.

1 participant