From 7c8be36e8bae4249212961efa3f741187e1a28ad Mon Sep 17 00:00:00 2001 From: Maciej Barelkowski Date: Tue, 18 Jun 2024 16:31:51 +0200 Subject: [PATCH] fix: add accessible names to code editors Closes #4370 --- client/src/app/tabs/json/CodeMirror.js | 5 ++++- client/src/app/tabs/xml/CodeMirror.js | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/client/src/app/tabs/json/CodeMirror.js b/client/src/app/tabs/json/CodeMirror.js index b21c10fe36..4d7fa7204c 100644 --- a/client/src/app/tabs/json/CodeMirror.js +++ b/client/src/app/tabs/json/CodeMirror.js @@ -55,6 +55,9 @@ export default function create() { language, tabSize, searchExtension, + EditorView.contentAttributes.of({ + 'aria-label': 'JSON editor' + }), ...extensions ] }); @@ -153,4 +156,4 @@ export default function create() { }; return instance; -} \ No newline at end of file +} diff --git a/client/src/app/tabs/xml/CodeMirror.js b/client/src/app/tabs/xml/CodeMirror.js index 7615c96ea0..19b0e9f33b 100644 --- a/client/src/app/tabs/xml/CodeMirror.js +++ b/client/src/app/tabs/xml/CodeMirror.js @@ -55,6 +55,9 @@ export default function create() { language, tabSize, searchExtension, + EditorView.contentAttributes.of({ + 'aria-label': 'XML editor' + }), ...extensions ] }); @@ -153,4 +156,4 @@ export default function create() { }; return instance; -} \ No newline at end of file +}