Skip to content

ENH - Make code blocks focusable #1100

@trallard

Description

@trallard

Right now, the code blocks (highlight) are not focusable, which makes them hard to navigate or inaccessible to readers using only their keyboards or screenreaders.

This can be fixed by ensuring the elements have a tabindex="0".

See an example of a focusable code block from gov.uk

Jan-05-2023.19-02-59.mp4

Originally posted by @trallard in #1095 (comment) -> the effort to add a max-height and scrollbar and making the pre elements focusable are independent.

And since I opened this and have been making plenty of noise, I will send a PR tomorrow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    tag: accessibilityIssues related to accessibility issues or efforts

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions