Skip to content

Commit

Permalink
Added more aria attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
gaagul committed Dec 19, 2023
1 parent 5bbf717 commit 9606b94
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/components/Editor/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,15 @@ const Editor = (
[contentClassName]: contentClassName,
});

const ariaAttributes = {
role: "textbox",
"aria-label": "editor-content",
"aria-multiline": "true",
"aria-labelledby": "labelId",
"aria-required": required,
"aria-roledescription": "editor",
};

const editor = useEditor({
extensions: customExtensions,
content: initialValue,
Expand All @@ -132,7 +141,7 @@ const Editor = (
class: editorClasses,
style: getEditorStyles({ rows }),
"data-cy": "neeto-editor-content",
"aria-label": "editor-content",
...ariaAttributes,
...contentAttributes,
},
clipboardTextParser,
Expand Down

0 comments on commit 9606b94

Please sign in to comment.