Adds some screen-reader-text for labeling the tablist.
Converts tabs to a list of buttons with tab role.
Adds aria-selected and aria-controls to each tab.
Sets z-index of inactive tabs to -1
Adds tabpanel role to the content containers
Adds aria-labeledby to the content containers
Add keyboard support for using arrows to control the tabs
The one piece that is missing is a aria-labeledby on the tablist - there is no header or text preceding it in the metabox to point to. The actual metabox container header added by WP has no unique ID to point at.
This PR refactors the markup, event handlers and aria for the summary metabox to make the tabs more accessible as per: https://www.w3.org/WAI/ARIA/apg/patterns/tabs/examples/tabs-manual/
tablist
role to the wrapper.tab
role.aria-selected
andaria-controls
to each tab.z-index
of inactive tabs to-1
tabpanel
role to the content containersaria-labeledby
to the content containersThe one piece that is missing is a
aria-labeledby
on thetablist
- there is no header or text preceding it in the metabox to point to. The actual metabox container header added by WP has no unique ID to point at.Fixes: #360