Skip to content

audit: report controls that share one accessible name #4762

Closed

Description

@thymikee

Problem

audit treats any nonempty name as valid. When several controls on one screen share one name, for example three buttons named "Save", a screen-reader user cannot tell them apart, and an agent cannot match a finding to one element by name (see help accessibility step 3).

Scope

  • Add a finding kind ambiguous-name in packages/capture-kit/src/snapshot/snapshot-audit.ts: two or more evaluated controls with the same role and the same normalized accessible name on the current screen.
  • Report one finding per affected control, with a detail that names the shared label and the count.
  • Severity: warning. Guidance line: give each control a unique label that names its target, for example "Save Lemon Herb Rice".
  • Exclusions: system bars and keyboard keys (existing rules); controls whose names differ only by case or surrounding whitespace count as the same.
  • Update contracts types, command-output text, commands.md, and the audit help.

Acceptance

  • Unit tests: three "Save" buttons produce three findings; "Save Lemon Herb Rice" and "Save Tomato Pasta" produce none; a "Save" button and a "Save" link (different roles) produce none.
  • No device run required: pure snapshot function and output formatting.

Activity

  1. added
    enhancement
    on Nov 19, 2026
  2. apex-sentinel-staging commented on Nov 19, 2026

    @apex-sentinel-staging

    Apex Sentinel · Issue review

    Suggested label: feature

    The issue proposes adding a new audit finding kind, ambiguous-name, with concrete scope, exclusions, severity, and acceptance tests, rather than reporting existing broken behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions