Do not treat empty visual text as an accessibility label - #86
Draft
Blackspirits wants to merge 6 commits into
Draft
Do not treat empty visual text as an accessibility label#86Blackspirits wants to merge 6 commits into
Blackspirits wants to merge 6 commits into
Conversation
Blackspirits
commented
Sep 13, 2026
Blackspirits
left a comment
Owner
Author
There was a problem hiding this comment.
Independent adversarial re-check: the stricter inferred-label rule no longer accepts empty visual text, while the five dynamic-label dependencies exposed by the first CI run are now explicit relationships rather than heuristic inference. The final full-solution CI #34768068663 passed restore, build and all tests on the first run; UITests reported 5,152 passed, 9 skipped, 0 failed. Retry was not used. No blocker identified. Keep draft; no merge or upstream change performed.
This was referenced Sep 13, 2026
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.
Summary
AccessibleLabels.IsLabelcurrently accepts empty visual controls as inferred labels:TextBlockwithText == null;Labelwith null/empty string content;CheckBox/RadioButtonwith an empty string.Once one of those controls is assigned through
AutomationProperties.LabeledBy,HasAccessibleNameconsiders the input named solely because the reference is non-null. That creates a false-green path where a literal empty spacer/status control can satisfy the accessibility sweep.The first stricter CI run exposed five real places that relied on an initially-empty dynamic label. Rather than weakening the inference rule again, this revision makes those intended relationships explicit:
This change therefore:
Label,TextBlock,CheckBoxorRadioButtonmay be used as an inferred label;LabeledByrelationships even when their bound text is temporarily empty;TextBlock, emptyLabel, and a normal short text label;Validation
40c97b2def70f1c7b919602fbf4e7bed7d0c9fd3AccessibleNamesTestsand identified the five dynamic-label dependencies above; retry reproduced the same five failuresAI assistance: ChatGPT was used to adversarially review inferred accessibility-label semantics, use the full accessibility sweep to discover dynamic-label dependencies, and replace heuristic empty-label acceptance with explicit relationships.