[P1] Stop emitting empty optional ARIA, role, tabindex, and IDREF attributes
Objective
Preserve native and slotted accessible names by omitting optional semantic attributes when they are unset.
Evidence
Multiple components render values such as aria-label="", role="", tabindex="", aria-controls="", and form="". Confirmed examples include button, card, chip, list-item, radio, switch, slider, search-bar, split-button, and dialog. An empty aria-label can suppress the visible/slotted name.
Scope
Adopt Lit nothing/ifDefined conventions, audit all templates, and add accessible-name/attribute-presence tests. Include status/indicator naming so decorative loading/progress/badge instances are silent and named instances are meaningful.
Acceptance criteria
- [ ] Optional semantic attributes are absent—not empty/false strings—when unset.
- [ ] Visible-label buttons, chips, cards, and items retain computed accessible names.
- [ ] IDREF attributes always point to an existing element.
- [ ] Hidden badges are absent from the accessibility tree.
- [ ] Determinate/indeterminate progress semantics and customizable names are correct.
- [ ] A lint/test convention prevents regression.
Dependencies
Blocked by #5 and #6; coordinate with #7, #8, #9, #10, and the dedicated tabs/tooltip work.
Autonomous execution contract
Keep this a semantic binding sweep; do not redesign visuals or duplicate composite-widget logic owned by other issues.
Toolchain/CI prerequisites and the dedicated P0 composite-widget work are now merged. This semantic-binding sweep is agent-ready; retain canonical public behavior only and coordinate with existing component contracts rather than reimplementing them.