Skip to content

Expose accessible names on main editor controls (#11553)#11573

Merged
niksedk merged 1 commit into
mainfrom
accessibility/edit-controls-screen-reader-11553
Jun 12, 2026
Merged

Expose accessible names on main editor controls (#11553)#11573
niksedk merged 1 commit into
mainfrom
accessibility/edit-controls-screen-reader-11553

Conversation

@niksedk

@niksedk niksedk commented Jun 12, 2026

Copy link
Copy Markdown
Member

Part of #11553 (screen-reader accessibility). Focused on the main editor's time/duration/text fields plus a few easy custom-drawn controls.

Problem

Screen readers read a control's UI Automation peer Name. The custom TimeCodeUpDown / SecondsUpDown controls put keyboard focus on an inner PART_TextBox whose name was empty, and several fields had no name at all — so the editor announced unlabeled "edit" fields with only their raw values.

Changes

  • TimeCodeUpDown / SecondsUpDown: forward AutomationProperties.Name to the inner PART_TextBox (the focused element) in OnApplyTemplate.
  • UiUtil.MakeNumericUpDown*: same forwarding for the built-in NumericUpDown → covers every numeric field in the app.
  • Main editor: named Start time, End time, Duration, Text and Layer controls with existing localized strings.
  • ColorWheelControl, WaveformPreviewControl, CuesPreviewControl: custom-drawn controls with no peer of their own now get a name.

Tests

Adds a headless Avalonia test (Avalonia.Headless.XUnit) that builds the real controls, applies their templates, and asserts the automation peer reports the expected name on the focused element — the exact value a screen reader speaks. Verified the test fails without the fix (Actual: null) and passes with it.

Notes

  • Uses existing localized strings, so names are already translated.
  • The three interactive custom canvases (AudioVisualizer waveform, AssaDrawCanvas, NOcrDrawingCanvasView) need bespoke OnCreateAutomationPeer() work and are left as a tracked follow-up.

🤖 Generated with Claude Code

…11553)

Screen readers (NVDA/JAWS/Narrator/VoiceOver) read a control's UI Automation
peer Name. The custom TimeCodeUpDown / SecondsUpDown controls focus an inner
PART_TextBox whose name was empty, and several fields had no name at all, so
the editor was largely unusable with a screen reader.

- TimeCodeUpDown / SecondsUpDown: forward the control's AutomationProperties.Name
  to the inner PART_TextBox (the focused element) in OnApplyTemplate.
- UiUtil.MakeNumericUpDown* factories: same forwarding for the built-in
  NumericUpDown, so every numeric field in the app is covered.
- Main editor: name the Start time, End time (Hide time), Duration, Text and
  Layer controls with existing localized strings.
- ColorWheelControl, WaveformPreviewControl, CuesPreviewControl: custom-drawn
  controls with no peer of their own now get a name.

Adds a headless Avalonia test (Avalonia.Headless.XUnit) asserting the automation
peer reports the expected name on the focused element for each control type.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@niksedk niksedk merged commit e1da4b5 into main Jun 12, 2026
1 of 3 checks passed
@niksedk niksedk deleted the accessibility/edit-controls-screen-reader-11553 branch June 12, 2026 18:42
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