Hi! According to MDN, elements with the tab role should be direct descendants of the tablist element. Alternatively, they can be referenced through aria-owns on the tablist element. In zag/ark, tab (trigger) elements are wrapped with a div (item). This is invalid.
Most component libraries "solve" this by only providing the list part of the stepper, leaving reactivity (tab switching) up to the user to implement. This allows you to skip adding aria roles in the first place.
If you intend to keep interactivity within the stepper component, I think the most flexible solution is to utilize aria-owns. Omitting the stepper item would remove too much flexibility.
🐛 Bug report
Hi! According to MDN, elements with the
tab
role should be direct descendants of thetablist
element. Alternatively, they can be referenced througharia-owns
on thetablist
element. In zag/ark,tab
(trigger) elements are wrapped with a div (item). This is invalid.💻 Link to reproduction
https://zagjs.com/components/react/steps
🧭 Possible Solution
Most component libraries "solve" this by only providing the list part of the stepper, leaving reactivity (tab switching) up to the user to implement. This allows you to skip adding aria roles in the first place.
If you intend to keep interactivity within the stepper component, I think the most flexible solution is to utilize
aria-owns
. Omitting the stepper item would remove too much flexibility.