Skip to content

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

@chriskrycho

Description

@chriskrycho

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions