Skip to content

fix(a11y): omit unset semantic attributes - #85

Open
Banegasn wants to merge 1 commit into
mainfrom
codex/issue-21-semantic-attributes
Open

fix(a11y): omit unset semantic attributes#85
Banegasn wants to merge 1 commit into
mainfrom
codex/issue-21-semantic-attributes

Conversation

@Banegasn

Copy link
Copy Markdown
Owner

Fixes #21

Summary

  • omit unset optional ARIA, role, tabindex, and IDREF attributes with Lit nothing/ifDefined across affected component templates
  • preserve visible and slotted control names; add the reusable browser regression helper and coverage for buttons, chips, cards, and list items
  • make unnamed progress and decorative/hidden badges absent from the accessibility tree; retain named determinate and indeterminate progress semantics
  • add focused tests for optional menu labels, menu IDREFs, and radio IDREF absence

Acceptance mapping

  • Optional semantic attributes are omitted rather than rendered empty or as optional false states.
  • Visible-label buttons, chips, cards, and items have browser accessibility coverage without aria-label masking their content.
  • IDREF attributes are omitted when unset; existing dialog/menu contracts continue to generate valid targets.
  • Decorative and hidden badges are removed from the accessibility tree; named badges expose a status.
  • Named determinate/indeterminate progress semantics are correct; unnamed progress is decorative.
  • test/semantic-attributes.ts establishes the browser regression convention.

Validation

  • pnpm typecheck
  • pnpm lint
  • focused browser tests across Chromium, Firefox, and WebKit for button, chip, badge, list, fab-menu, and split-button
  • pnpm test exercises all component suites successfully but the existing Angular shell test fails under the available Node 26 runtime because localStorage is undefined.

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.

[P1] Stop emitting empty optional ARIA, role, tabindex, and IDREF attributes

1 participant