Skip to content

[Bug] Non-native as elements get button ARIA but dead keyboard (Button, Toggle, PaginationItem) + Atom type=button default #616

Description

@johnleider

From the #543 WS4 audit — a cross-family sweep item:

  • ButtonRoot.vue:210-226: as='div' renders role=button + tabindex but no Enter/Space onKeydown.
  • ToggleRoot.vue:149-154: handles Space only; Enter relies on native button semantics; non-native as also never gets role=button (:173).
  • PaginationItem.vue:112-122: same native-button reliance.
  • Atom.vue:101-108: as="button" doesn't default type="button" — a bare polymorphic button inside a form submits it. ~4 LOC but a behavior change; decide intentionality.

Fix pattern: when as is not a native button, add role=button (where missing), and an onKeydown handler mapping Enter/Space to the click path. Sibling components (CollapsibleActivator.vue:84-104, ExpansionPanelActivator.vue:89-110) already implement exactly this fallback — mirror them.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions