fix(a11y): WCAG 2.1 AA fixes (#2219)

This commit is contained in:
Philip Okugbe
2026-05-20 16:47:25 +01:00
committed by GitHub
parent 1c166c4736
commit 92c0e36e46
119 changed files with 1064 additions and 194 deletions
+6 -4
View File
@@ -120,15 +120,17 @@ export const Indent = Extension.create<IndentOptions>({
};
return {
// Return the command's result so Tab falls through to the browser
// (moving focus out of the editor) once the user has reached max
// indent. Without this Tab stays trapped at max depth, failing
// WCAG 2.1.2.
Tab: () => {
if (!isInIndentableBlock()) return false;
this.editor.commands.indent();
return true;
return this.editor.commands.indent();
},
'Shift-Tab': () => {
if (!isInIndentableBlock()) return false;
this.editor.commands.outdent();
return true;
return this.editor.commands.outdent();
},
Backspace: () => {
const { $from, empty } = this.editor.state.selection;