Skip to content

Commit

Permalink
fix(CodeSnippet): remove tabindex on disabled snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
emyarod committed Dec 17, 2020
1 parent d9f8df7 commit 548fb2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react/src/components/CodeSnippet/CodeSnippet.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ function CodeSnippet({
<div
ref={codeContainerRef}
role={type === 'single' ? 'textbox' : null}
tabIndex={type === 'single' ? 0 : null}
tabIndex={type === 'single' && !disabled ? 0 : null}
className={`${prefix}--snippet-container`}
aria-label={ariaLabel || copyLabel || 'code-snippet'}
onScroll={(type === 'single' && handleScroll) || null}>
Expand Down

0 comments on commit 548fb2c

Please sign in to comment.