Skip to content

Do not treat empty visual text as an accessibility label - #86

Draft
Blackspirits wants to merge 6 commits into
upl/review-base-40c9from
fix/accessibility-empty-labels-40c9
Draft

Do not treat empty visual text as an accessibility label#86
Blackspirits wants to merge 6 commits into
upl/review-base-40c9from
fix/accessibility-empty-labels-40c9

Conversation

@Blackspirits

@Blackspirits Blackspirits commented Sep 13, 2026

Copy link
Copy Markdown
Owner

Summary

AccessibleLabels.IsLabel currently accepts empty visual controls as inferred labels:

  • a TextBlock with Text == null;
  • a Label with null/empty string content;
  • a CheckBox / RadioButton with an empty string.

Once one of those controls is assigned through AutomationProperties.LabeledBy, HasAccessibleName considers 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:

  • Manual chosen encoding preview → its bound current-encoding label;
  • Edit whole text → its bound line-info label;
  • Apply duration limits → each table → its bound status/section label;
  • Pick audio track → stable “Select audio track” accessible name.

This change therefore:

  • requires non-whitespace visible text before Label, TextBlock, CheckBox or RadioButton may be used as an inferred label;
  • preserves explicit LabeledBy relationships even when their bound text is temporarily empty;
  • adds focused regressions for empty TextBlock, empty Label, and a normal short text label;
  • converts the five CI-discovered dynamic cases from heuristic inference to explicit semantics.

Validation

  • based on upstream 40c97b2def70f1c7b919602fbf4e7bed7d0c9fd3
  • initial CI #34767587845 failed deterministically in AccessibleNamesTests and identified the five dynamic-label dependencies above; retry reproduced the same five failures
  • revised full solution restore passed
  • revised full solution build passed
  • revised full solution test suite passed on the first run
  • UI suite: 5,152 passed, 9 skipped, 0 failed (5,161 total)
  • retry step was not used
  • validation run: #34768068663

AI 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.

@Blackspirits Blackspirits left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

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.

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