From e63c1669ab39a83d70ef506a824133a095d16008 Mon Sep 17 00:00:00 2001 From: Alexey Pyltsyn Date: Sun, 29 Mar 2020 04:47:29 +0300 Subject: [PATCH] fix(v2): improve code block scroll accessibility --- packages/docusaurus-theme-classic/src/theme/CodeBlock/index.js | 3 +++ .../src/theme/CodeBlock/index.js | 3 +++ 2 files changed, 6 insertions(+) diff --git a/packages/docusaurus-theme-classic/src/theme/CodeBlock/index.js b/packages/docusaurus-theme-classic/src/theme/CodeBlock/index.js index 72f749fbdf4f..7a39e395c60e 100644 --- a/packages/docusaurus-theme-classic/src/theme/CodeBlock/index.js +++ b/packages/docusaurus-theme-classic/src/theme/CodeBlock/index.js @@ -5,6 +5,8 @@ * LICENSE file in the root directory of this source tree. */ +/* eslint-disable jsx-a11y/no-noninteractive-tabindex */ + import React, {useEffect, useState, useRef} from 'react'; import classnames from 'classnames'; import Highlight, {defaultProps} from 'prism-react-renderer'; @@ -117,6 +119,7 @@ export default ({children, className: languageClassName, metastring}) => { {showCopied ? 'Copied' : 'Copy'}
diff --git a/packages/docusaurus-theme-live-codeblock/src/theme/CodeBlock/index.js b/packages/docusaurus-theme-live-codeblock/src/theme/CodeBlock/index.js
index e617383ca606..5a8ec2f92bca 100644
--- a/packages/docusaurus-theme-live-codeblock/src/theme/CodeBlock/index.js
+++ b/packages/docusaurus-theme-live-codeblock/src/theme/CodeBlock/index.js
@@ -5,6 +5,8 @@
  * LICENSE file in the root directory of this source tree.
  */
 
+/* eslint-disable jsx-a11y/no-noninteractive-tabindex */
+
 import React, {useEffect, useState, useRef} from 'react';
 import classnames from 'classnames';
 import Highlight, {defaultProps} from 'prism-react-renderer';
@@ -136,6 +138,7 @@ export default ({
               {showCopied ? 'Copied' : 'Copy'}