Sandwich Condiments
- Lettuce
- Tomato
- Mustard
- Lettuce
Lessons learned:
- Original example adds a
focusclass to the checkbox but it is unused from what I could tell; so I have chosen to omit it. aria-controlsfeels like it makes it harder to get it right, since relying on the DOM to be able to find/derive state is more work than simply passing the state down through a framework. I decided to bypass this by using Sveltebind:thisto give the Checkbox a reference to the rendered DOM node. This gives me access to the element's ID.