Bugfix 5931: Scrollable content should be accessible by keyboard tabs (#771)
Co-authored-by: Suresh <soudher1@Sureshs-MacBook-Pro.local>
soudher1 committed
Oct 16, 2023 at 17:33 UTC
cb7be792d7d9056d297c858b98e7d34c73707378
1 file changed
+1
-1
theme/src/components/code.js
+1
-1
@@ -52,7 +52,7 @@ function Code({className, children}) {
52
</div>
53
<Highlight {...defaultProps} code={code} language={language} theme={githubTheme}>
54
{({className, style, tokens, getLineProps, getTokenProps}) => (
55
- <BorderBox as="pre" className={className} mt={0} mb={3} p={3} border={0} style={{...style, overflow: 'auto'}}>
55
+ <BorderBox tabIndex={0} as="pre" className={className} mt={0} mb={3} p={3} border={0} style={{...style, overflow: 'auto'}}>
56
{/* This is the scroll handle, it is supposed to be focused with keyboard and scroll a wide codebox horizontally */}
57
<div aria-hidden="true" style={{visibility: 'hidden', position: 'absolute', ...size}} ref={scrollRef} />
58
{tokens.map((line, i) => (