Skip to content

fix(admin): re-audit minors in the editor field (names, focus, panels, mobile, dark mode, translations) - #38

Merged
Schero94 merged 4 commits into
mainfrom
fix/ui-reaudit-minors
Nov 20, 2026
Merged

Schero94 merged 4 commits into
mainfrom
fix/ui-reaudit-minors

Conversation

@Schero94

Copy link
Copy Markdown
Owner

Second of three stacked PRs for the UI re-audit of the editor field. Base: #36 (retarget to main after #36 is merged). Settings pages are out of scope.

Before / after (isolated host, Strapi 5.63, packed tarball, headless Chromium)

Finding Before (audit 2.7.6) After
Field accessible name none holder role=group, aria-labelledby = field label (f6: "group -> body")
Inline toolbar names 13 buttons without name (s6) all named except none (s6: Convert to, Bold, Italic, Link, …; inline code via package-title fallback)
Inline toolbar keyboard entry none Alt+F10 → first item, arrows move, Escape → back to text with selection (f6)
Fast shortcuts (<150 ms) fail not changed: Editor.js behaviour (InlineToolbar.enableShortcuts handler needs the popover built after the debounced selectionchange) — documented in CHANGELOG
Escape in link input focus lost back to the paragraph (f6)
Media Library block focus BODY after Confirm / Escape caret in editor (s25: Escape → ce-paragraph)
CTA switch name none switch "featured" (s33)
Person CSP notice squeezed into 72 px circle own row (s33: text 505×95 at 1440, 193×200 at 390); unit test
≤650 px handles white in dark mode, 24 px DS surface/border, 32 px below 520 px; DS overlay for bottom sheet
Insert Video/Audio/Attachment focus next paragraph Choose button for video and audio (s18); attachment: see note
Suggest mode More tools inert entries only "Keyboard shortcuts" (t4)
Grammar focus / Escape — / no heading on open, Check again after check, heading/next issue after fix (t13); Escape closes Quality, Grammar, Comments, Suggestions (t12, was blocked by the IconButton tooltip's preventDefault)
Nested confirm Cancel/Escape body opener button (t15)
Comments focus / load error body / read-only with zeros Reply button after send, Edit after cancel; "could not be loaded" + Try again (t5)
Focus after send suggestions / Replace all / Check links body Suggestions heading / find input / Check links (t6, t9, t16)
Presence announcements per field once per entry (c4: one join, one leave with 2 fields)
Contextual names "Accept", "Reply" … "Accept suggestion by Ben Muster: Change, …", "Reply to Review Admin: …"
"No problems" with 0 links shown "No links were checked." (t16)
AI error codes generic own messages for UNREACHABLE, BAD_RESPONSE, RESPONSE_TOO_LARGE, EMPTY, PROVIDER_ERROR (TOO_DEEP never reaches an AI dialog)
Leftover English Indent, File title, Enter a caption, Plain text, HTML / XML translated in en/de/fr/es/pt
Dark mode cosmetics attaches hover #f2f2f2, checkbox color-scheme: normal, image-tool/loader/nothing-found light tokens; color-scheme: dark on all native controls (s32)

Tests: tests/admin/{inline-toolbar,csp-person,panels-a11y}.test.jsx, tests/{ai-errors,presence-announce}.test.mjs. lint, format:check, npm test (1000), test:admin (74), test:core-blocks (33) green locally.

Docs read: Editor.js 2.31.7 dist (inline toolbar, i18n namespaces, 650 px CSS), @editorjs/attaches 1.3, @editorjs/image 2.10, editorjs-indent-tune 1.4, DS 2.3.1 (Field.Label id, setOpacity, IconButton/Tooltip), Radix DismissableLayer.

🤖 Generated with Claude Code

Base automatically changed from fix/ui-reaudit-majors to main November 20, 2026 15:08
Schero94 and others added 4 commits November 20, 2026 16:11
Re-audit minors (field panels, side panel, AI dialogs):

- Grammar panel takes focus when it opens; Escape closes the grammar and
  quality panels (not inside an open listbox, menu or dialog).
- Cancel/Escape on the template "replace" and version "restore" confirms
  returns focus to the button that asked.
- Comments: focus back on Reply after sending or cancelling a reply and on
  Edit after saving or cancelling an edit; a failed first load shows the
  error with Try again and no zero counts or read-only text.
- Focus stays in the find panel after Replace all, returns to "Check links"
  after the check, and the suggestions panel takes lost focus after a
  reviewer sent suggestions.
- Presence join/leave is announced once per entry, not once per field.
- Contextual names for Edit/Delete/Reply/Resolve/Reopen and
  Accept/Reject/Withdraw/Show block.
- Side panel "Check"/"Show" are DS buttons (size S) instead of text buttons.
- "No links were checked." instead of "no problems" when every link was
  skipped.
- AI dialogs: shared messages for UNREACHABLE, BAD_RESPONSE,
  RESPONSE_TOO_LARGE, EMPTY and PROVIDER_ERROR.

Docs read: DS 2.3.1 Button/IconButton types, @strapi/admin 5.63
ConfirmDialog, Radix Dialog onOpenChange (focus restore), React hooks rules
(react.dev purity).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e in the field

Re-audit minors and cosmetics (editor field):

- The editor is a group named by the field label (aria-labelledby, as
  Strapi Blocks); inline toolbar buttons get their tool's name; the
  component block switch is named after its attribute.
- Alt+F10 enters the inline toolbar, arrows move, Escape returns to the
  selected text; Escape in the link input returns to the text.
- Video, audio and attachment blocks get focus on Choose after insert;
  Media Library Confirm/Escape put the caret back into the editor.
- Suggest mode keeps only the More tools entries that work there.
- Panel Escape no longer blocked by the IconButton tooltip; grammar check
  and fix keep focus.
- Person CSP notice in its own row; handles 32 px below 520 px, DS surface
  instead of Editor.js' white mobile buttons; DS overlay for the bottom
  sheet; color-scheme for native controls; attaches hover, image tool,
  loader and "Nothing found" tokens.
- Indent tune, embed/attachment placeholders, "Plain text" and "HTML and
  XML" translated in en/de/fr/es/pt; panel keys from the parallel commit.

Docs read: Editor.js 2.31.7 dist (InlineToolbar shortcuts need the popover,
built after the debounced selectionchange; i18n namespaces tools/<name>,
blockTunes/<tune>; 650 px mobile CSS), @editorjs/attaches 1.3, @editorjs/image
2.10, editorjs-indent-tune 1.4 bundle, DS 2.3.1 Field.Label id
(`${id}-label`), setOpacity, Radix DismissableLayer Escape.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…focus after insert

@editorjs/attaches 1.3 renders the button as a clickable div. It gets
role=button, a tab stop and Enter/Space, so Tab reaches it and the field
focuses it after the block is inserted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Schero94
Schero94 force-pushed the fix/ui-reaudit-minors branch from a420dde to 570af2e Compare November 20, 2026 15:12
@Schero94
Schero94 merged commit cd9e7c7 into main Nov 20, 2026
22 checks passed
@Schero94
Schero94 deleted the fix/ui-reaudit-minors branch November 20, 2026 15:17
github-actions Bot pushed a commit that referenced this pull request Nov 20, 2026
## [2.8.3](v2.8.2...v2.8.3) (2026-11-20)

### Bug Fixes

* **admin:** accessible names, focus, panels and translations in the editor field ([#38](#38)) ([cd9e7c7](cd9e7c7))

### Fixed (editor field: names, focus, panels, translations)

- **Names.** The editor of a field is a group named by the field label (as Strapi's Blocks field). Inline toolbar buttons are named after their tool, the component block switch after its attribute, and the repeated Accept, Reject, Edit, Reply, Resolve and Reopen buttons say whose comment or suggestion and which text they act on.
- **Inline toolbar by keyboard.** With text selected, Alt+F10 moves focus into the inline toolbar (as in the table and column tools), the arrow keys move between its buttons, and Escape goes back to the selected text. Escape in the link input returns to the text too. The shortcut timing (Ctrl/Cmd+I, U, Shift+M, K pressed within about 150 ms of selecting) is Editor.js behaviour: its inline tool shortcuts work only once the inline toolbar was built after the debounced selection change (Editor.js 2.31 `InlineToolbar.enableShortcuts`); it is left as is.
- **Focus.** After inserting a video, audio or attachment block, focus is on its Choose button. After the Media Library dialog (Confirm, Escape or Close), the caret is in the inserted image or back where the block was inserted. After posting a reply or cancelling an edit, after sending suggestions, after Replace and Replace all, after Check links and after a grammar check or fix, focus stays on a defined control. Cancel or Escape in the template replace and version restore confirmations returns to the button that opened them. The grammar panel takes focus, and Escape closes the quality, grammar, comments and suggestions panels also when the focused button shows its tooltip.
- **States.** A comments load error shows the error with Try again instead of read-only with zero counts. "No links were checked." replaces "Link check finished: no problems" when nothing was checked. The AI dialogs show their own messages for `UNREACHABLE`, `BAD_RESPONSE`, `RESPONSE_TOO_LARGE`, `EMPTY` and `PROVIDER_ERROR`.
- **Suggest mode.** More tools offers only the entries that work while suggesting (keyboard shortcuts); the others acted on the hidden field.
- **Presence.** Joining and leaving the entry is announced once per entry, not once per field.
- **Layout and dark mode.** A blocked person photo shows its Content Security Policy notice in its own row instead of the 72 px circle. Below 650 px the **+** and block menu handles use the DS surface and border (they were white in dark mode) and 32 px targets on phones; the bottom sheet's backdrop uses the DS overlay colour. The side panel's Check is a DS button. Native checkboxes, selects and inputs in blocks follow the admin theme (`color-scheme`), and the attachment download hover, the image tool, the loader and "Nothing found" no longer show Editor.js' light colours in dark mode.
- **Translations.** The indent block tune, the embed caption and attachment title placeholders and the code languages "Plain text" and "HTML and XML" are translated in all five admin languages.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant