There are various accessibility problems with the ToggleCompositeField right now:
- Uses an interactable
h4 element instead of a button element
- Includes a
<a href="#"> element inside the h4 - but since the h4 is tabbable the link is redundant
- Missing a bunch of appropriate
aria attributes to indicate to screen reader users what they're focused on and what it does when activated (aria-expanded etc)
Probably makes sense to follow the W3C accordion pattern for this. There's also the W3C Disclosure pattern which is similar.
Related
There are various accessibility problems with the
ToggleCompositeFieldright now:h4element instead of abuttonelement<a href="#">element inside theh4- but since theh4is tabbable the link is redundantariaattributes to indicate to screen reader users what they're focused on and what it does when activated (aria-expandedetc)Probably makes sense to follow the W3C accordion pattern for this. There's also the W3C Disclosure pattern which is similar.
Related
tablistandtabpanelroles incorrectly. silverstripe-admin#1965