Skip to content

Commit 0cfa233

Browse files
committed
fix: Set role and aria-label for tiptap element
Signed-off-by: Julius Knorr <jus@bitgrid.net>
1 parent 57e75bd commit 0cfa233

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/EditorFactory.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
import 'proxy-polyfill'
77

8+
import { translate as t } from '@nextcloud/l10n'
89
import { Editor } from '@tiptap/core'
910
import hljs from 'highlight.js/lib/core'
1011
import { createLowlight } from 'lowlight'
@@ -35,6 +36,10 @@ const loadSyntaxHighlight = async (language) => {
3536
const editorProps = {
3637
scrollMargin: 50,
3738
scrollThreshold: 50,
39+
attributes: {
40+
role: 'textbox',
41+
'aria-label': t('text', 'Text editor'),
42+
},
3843
}
3944

4045
const createRichEditor = ({

0 commit comments

Comments
 (0)