Skip to content

fix(datagrid): label cell-inspector field editors for VoiceOver (#1490)#1509

Merged
datlechin merged 2 commits into
mainfrom
a11y/inspector-cell-editors
May 30, 2026
Merged

fix(datagrid): label cell-inspector field editors for VoiceOver (#1490)#1509
datlechin merged 2 commits into
mainfrom
a11y/inspector-cell-editors

Conversation

@datlechin
Copy link
Copy Markdown
Member

Part of #1490 (keyboard, focus, accessibility). Inspector / cell-editor surface.

The cell-inspector field editors (single-line, multi-line, blob/hex, JSON, boolean/enum/set pickers) had no accessibility label on the editor control, so VoiceOver announced a bare text field with no context. This adds the column name and current value at the shared editor dispatch (EditableFieldView.resolvedEditor), so every editor inherits .accessibilityLabel(columnName) and .accessibilityValue(value). Zero visual change.

Several gaps from the audit are already merged (filter Apply focus return and .defaultAction in #1492). Deferred because they are UX/visual decisions or larger refactors:

  • The Set NULL / Set DEFAULT / SQL-functions menu is hover-gated (mouse-only); making it keyboard-reachable means showing it always or on focus, a visible UX change worth deciding deliberately.
  • Lifting the per-editor @FocusState to the parent for Tab order + commit/cancel shortcuts.
  • The CellOverlayEditor focus-ring treatment.

Lint clean, style gate clean.

@datlechin datlechin merged commit 92e134e into main May 30, 2026
4 checks passed
@datlechin datlechin deleted the a11y/inspector-cell-editors branch May 30, 2026 07:00
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 262d00ef47

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

private func resolvedEditor(for kind: FieldEditorKind) -> some View {
editorContent(for: kind)
.accessibilityLabel(context.columnName)
.accessibilityValue(context.value.wrappedValue)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Expose NULL states in the accessibility value

When the inspected cell is actually NULL, RightSidebarView builds this binding as field.originalValue ?? "", while the visible editor shows NULL via the placeholder/sentinel paths. This new modifier therefore gives VoiceOver an empty value for NULL cells (and similarly for multi-row “Multiple values”), so the accessibility fix still omits the state users need to hear. Derive the spoken value from originalValue/hasMultipleValues/pending state instead of the raw binding string.

Useful? React with 👍 / 👎.

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