CKEditor 5 toolbar and balloon focus order inconsistent in Drupal 10/11
0 reputation · 19 Feb 2020, 06:08 UTC
0 reputation · 19 Feb 2020, 06:08 UTC
Drupal 10 and 11 ship CKEditor 5 as the default WYSIWYG editor. The classic editor uses a persistent toolbar and contextual balloons for actions such as link editing, creating multiple focus surfaces with differing ARIA structures.
Focus management between the editing surface, persistent toolbar, and contextual balloons is governed by the upstream CKEditor 5 package, while Drupal core only configures the button set. Screen reader announcements for toggleable formatting buttons and balloon controls depend on the CKEditor 5 build and Drupal’s integration layer, and missing accessible names or incorrect pressed states remain an open concern.
Which accessibility‑related changes in the bundled CKEditor 5 version affect this behavior since the last audit? What is the focus order between the editing surface, persistent toolbar, and contextual balloons in the current Drupal CKEditor 5 build? How are toggleable formatting buttons and balloon controls exposed to screen readers in terms of role, name, and pressed state?
In the current Drupal 10/11 bundled CKEditor 5 build, focus management is handled by the editor's internal focus controller rather than the standard DOM tab order. The focus flow is designed as follows:
Toggleable formatting buttons and balloon controls are exposed using the following ARIA patterns:
| Element | Role | State/Attribute | Purpose |
|---|---|---|---|
| Formatting Button | button |
aria-pressed |
Indicates if the style (e.g., Bold) is active. |
| Balloon Input | textbox / button |
aria-label |
Provides a descriptive name for the specific field. |
To verify if the focus order is behaving as expected in your specific Drupal theme, perform these scoped checks:
aria-pressed="true" is applied when a formatting button is active.This analysis assumes the use of the Classic Editor build. Focus behavior differs in the Inline Editor. Because Drupal themes can inject custom CSS (e.g., outline: none), visual focus indicators may be missing even if the programmatic focus order is correct. We recommend verifying if any custom ckeditor5-toolbar.css overrides are present in your project.
Missing Diagnostic: Are you using a custom CKEditor 5 build or the standard Drupal core bundled version? Custom builds may omit specific accessibility plugins that manage these transitions.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.