diff --git a/apps/web/src/editor/MentionAutocomplete.tsx b/apps/web/src/editor/MentionAutocomplete.tsx index 873fcf6..17281c2 100644 --- a/apps/web/src/editor/MentionAutocomplete.tsx +++ b/apps/web/src/editor/MentionAutocomplete.tsx @@ -121,7 +121,7 @@ export function MentionAutocomplete({ editor }: { editor: Editor }): React.JSX.E style={{ position: 'fixed', left: state.coords.left, top: state.coords.bottom + 4 }} > {suggestions.map((user, index) => ( -
  • +
  • )} {searchOpen && user && setSearchOpen(false)} />} diff --git a/apps/web/src/pages/PageEditorPage.tsx b/apps/web/src/pages/PageEditorPage.tsx index 93ed349..5560e2e 100644 --- a/apps/web/src/pages/PageEditorPage.tsx +++ b/apps/web/src/pages/PageEditorPage.tsx @@ -209,7 +209,19 @@ function PageEditor({ useLayoutEffect(() => { editor?.setEditable(canEdit); - }, [editor, canEdit]); + // TipTap rendert die Fläche als role="textbox" — ohne Namen, und im + // Lesemodus ist "Textfeld" schlicht falsch (#164, WCAG 4.1.2). Im + // Lesemodus wird sie zum benannten Dokument-Bereich. + editor?.setOptions({ + editorProps: { + attributes: { + role: canEdit ? 'textbox' : 'document', + 'aria-label': t('contentLabel'), + ...(canEdit ? { 'aria-multiline': 'true' } : {}), + }, + }, + }); + }, [editor, canEdit, t]); // Entering edit mode drops the caret straight into the content, so writing // starts without an extra — and on empty pages pixel-precise — click. Skip diff --git a/apps/web/src/search/SearchPalette.tsx b/apps/web/src/search/SearchPalette.tsx index f5265c9..c31e312 100644 --- a/apps/web/src/search/SearchPalette.tsx +++ b/apps/web/src/search/SearchPalette.tsx @@ -208,7 +208,7 @@ export function SearchPalette({ onClose }: { onClose: () => void }): React.JSX.E ) : (