I noticed when you enter the accordion using VoiceOver it announces "tab 1 of 1", whereas it should say "tab 1 of 4".
I think there are a couple issues:
- It seems like in VoiceOver a
tablist can only contain tab children. Putting tabpanel inside tablist breaks everything. However the Authoring Practices Guide says "Contained within the tablist is a set of tab/tabpanel pairs." So that's a little confusing. cc @MichielBijl to confirm if tabpanel must live outside tablist.
- The
tabpanel should go on the .content divs
sc-pane should have role=presentation
I think the final structure would be something like:
<sc-accordion>
<sc-tabs role="tablist">
<sc-pane role="presentation">
<button role="tab" aria-controls="panel1">Panel 1</button>
</sc-pane>
...
</sc-tabs>
<sc-panel id="panel1" role="tabpanel">Lorem ipsum...</sc-panel>
...
</sc-accordion>
I noticed when you enter the accordion using VoiceOver it announces "tab 1 of 1", whereas it should say "tab 1 of 4".
I think there are a couple issues:
tablistcan only containtabchildren. Puttingtabpanelinsidetablistbreaks everything. However the Authoring Practices Guide says "Contained within the tablist is a set of tab/tabpanel pairs." So that's a little confusing. cc @MichielBijl to confirm iftabpanelmust live outsidetablist.tabpanelshould go on the.contentdivssc-paneshould haverole=presentationI think the final structure would be something like: