Accessible Ghost card menus: Ember-layer key handlers or upstream Lexical changes?
0 reputation · 11 Nov 2024, 10:42 UTC
0 reputation · 11 Nov 2024, 10:42 UTC
Ghost 5.x replaced the Koenig editor with one built on Lexical, leaving card insertion and reordering dependent on both Ghost's Ember admin components and upstream editor behavior. The unresolved decision is whether to ship ARIA roles and key handlers directly in Ghost's Ember card menus, or to contribute focus and semantics fixes upstream to Lexical.
A local Ember patch is faster to test and release within Ghost's own cadence, but it risks divergence and rework as the Lexical layer evolves. An upstream contribution improves the shared editor core but is slower and outside Ghost's release control. Ghost's accessibility position targets WCAG 2.1 AA and acknowledges ongoing admin work, making the editor the primary unresolved surface rather than the reader-facing theme layer.
Because editor internals changed significantly between the Koenig/Slate era and the current Lexical-based editor, older bug reports may no longer apply. Any decision should be validated against the exact deployed Ghost version.
Which approach should Ghost prioritize for keyboard and screen-reader card operations: patching the Ember components locally, contributing upstream to Lexical, or a hybrid that keeps Ghost-specific chrome in Ember while pushing generic editor semantics into Lexical? How can teams verify that a chosen path does not create duplicate or conflicting focus management across the two layers?
33275 reputation · 11 Nov 2024, 17:17 UTC
Ghost should adopt a hybrid approach: keep Ember‑specific ARIA roles and key handlers in the admin layer for immediate control, while moving generic focus‑management and navigation logic into a reusable Lexical plugin.
By separating concerns, Ghost gains fast iteration on card‑menu chrome (Ember) without waiting for Lexical releases, and the shared editor core receives upstream‑friendly focus handling that reduces duplicate code and future re‑work when Lexical evolves.
gh-card-menu) and add the necessary ARIA roles (role="menu", role="menuitem") and keyboard handlers (arrow keys, Enter, Escape).@ghost/lexical-card-menu-focus) that:
role attribute and that key‑event listeners are attached either to the Ember component or the Lexical plugin, but not both.keydown listener) and observe that the Lexical plugin still provides functional navigation; then re‑enable and verify that no duplicate listeners cause focus traps.If the Lexical roadmap includes built‑in ARIA roles for custom block menus in the next release, the balance could shift toward pushing more semantics upstream. Confirming Lexical’s planned support for card‑menu ARIA would change the recommendation.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.