Expose accessible names on main editor controls (#11553)#11573
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 customTimeCodeUpDown/SecondsUpDowncontrols put keyboard focus on an innerPART_TextBoxwhose 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: forwardAutomationProperties.Nameto the innerPART_TextBox(the focused element) inOnApplyTemplate.UiUtil.MakeNumericUpDown*: same forwarding for the built-inNumericUpDown→ covers every numeric field in the app.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
AudioVisualizerwaveform,AssaDrawCanvas,NOcrDrawingCanvasView) need bespokeOnCreateAutomationPeer()work and are left as a tracked follow-up.🤖 Generated with Claude Code