Skip to content

Commit 6b3701c

Browse files
committed
fix(ui-source-code-editor): make scrollview in SourceCodeEditor keyboard accessible
1 parent 9cbfd35 commit 6b3701c

File tree

1 file changed

+8
-0
lines changed
  • packages/ui-source-code-editor/src/SourceCodeEditor

1 file changed

+8
-0
lines changed

packages/ui-source-code-editor/src/SourceCodeEditor/index.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,14 @@ class SourceCodeEditor extends Component<SourceCodeEditorProps> {
295295
parent: this._containerRef
296296
})
297297

298+
// from the a11y team:
299+
// axe devtools and other automated a11y tests both flagging this issue,
300+
// which can be observed while navigating with keyboard:
301+
// Ensure elements that have scrollable content are accessible by keyboard
302+
// To solve this problem, you need to fix at least (1) of the following:
303+
// Element should have focusable content, Element should be focusable
304+
this._editorView.scrollDOM.tabIndex = 0
305+
298306
if (autofocus) {
299307
this.focus()
300308
}

0 commit comments

Comments
 (0)