fix(datagrid): label cell-inspector field editors for VoiceOver (#1490)#1509
Conversation
Signed-off-by: Ngô Quốc Đạt <datlechin@gmail.com>
There was a problem hiding this comment.
💡 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) |
There was a problem hiding this comment.
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 👍 / 👎.
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
.defaultActionin #1492). Deferred because they are UX/visual decisions or larger refactors:@FocusStateto the parent for Tab order + commit/cancel shortcuts.CellOverlayEditorfocus-ring treatment.Lint clean, style gate clean.