pydata-sphinx-theme icon indicating copy to clipboard operation
pydata-sphinx-theme copied to clipboard

Ensure code blocks (<pre>) are keyboard focusable

Open gabalafou opened this issue 5 months ago • 0 comments

Fixes #1100. Also closes one of the subtasks of #1428. Inspired by #1104.

Whitespace-preserving blocks in our theme, such as code blocks, currently do not have an easy way for keyboard users to focus on them and use the arrow keys to scroll the block to the right in order to read long lines that overflow the width of the block. This is also an accessibility issue; if you have to use a mouse, a pointer, or your finger—anything other than just your keyboard—to scroll a code block, then that's a violation of WCAG 2.1.1.


Check the end user effects of this PR on the Read the Docs preview build of the Kitchen Sink Blocks page

gabalafou avatar Jan 08 '24 04:01 gabalafou