Prerequisite patterns
Weather shell
$156
Cart: 0 items.
Interaction journey
Each transition has an owner.
Buttons expose local busy states. The shop status announces cart results. The modal creates a deliberate context change and owns quantity feedback while open.
Add
Focus remains on the product button while the item is added.
Announce
The shared status gives product name and complete cart quantity.
Review
The native dialog moves focus inside and contains keyboard navigation.
Return
Close or Escape restores focus to Open cart.
End-to-end test
Follow the task, not just components.
- Tab through every card: title link, then Add to cart; images and prices are skipped.
- Add multiple products and confirm each busy state, product name, and cart quantity.
- Open the cart and confirm focus starts at the named dialog title.
- Change quantities and confirm totals and complete status messages update.
- Tab forward and backward without escaping the open modal.
- Close with the button and with Escape; focus returns to Open cart both ways.
- Resize and zoom while the dialog is open; all content and controls remain reachable.