From 0fb577a34f21108da03f749c75122b8931b20e6d Mon Sep 17 00:00:00 2001 From: Maciej Barelkowski Date: Tue, 18 Jun 2024 16:44:58 +0200 Subject: [PATCH] fix: add tabindex to editor This is required to satisfy the axe-core tool, even though the focus works fine without tabindex. --- client/src/app/tabs/json/CodeMirror.js | 3 ++- client/src/app/tabs/xml/CodeMirror.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/client/src/app/tabs/json/CodeMirror.js b/client/src/app/tabs/json/CodeMirror.js index 4d7fa7204c..a65550a138 100644 --- a/client/src/app/tabs/json/CodeMirror.js +++ b/client/src/app/tabs/json/CodeMirror.js @@ -56,7 +56,8 @@ export default function create() { tabSize, searchExtension, EditorView.contentAttributes.of({ - 'aria-label': 'JSON editor' + 'aria-label': 'JSON editor', + 'tabindex': 0 }), ...extensions ] diff --git a/client/src/app/tabs/xml/CodeMirror.js b/client/src/app/tabs/xml/CodeMirror.js index 19b0e9f33b..04fa4a9fd8 100644 --- a/client/src/app/tabs/xml/CodeMirror.js +++ b/client/src/app/tabs/xml/CodeMirror.js @@ -56,7 +56,8 @@ export default function create() { tabSize, searchExtension, EditorView.contentAttributes.of({ - 'aria-label': 'XML editor' + 'aria-label': 'XML editor', + 'tabindex': 0 }), ...extensions ]