An accordion block with ACF fields.
An accessible accordion block that uses ACF PRO fields. The interactivity of the accordion comes from 10up's Component Library.
ARIA is added with JavaScript. The recommended markup allows for avoiding keyboard trap, which can often trip of keyboard navigation and other input devices.
If JavaScript is enabled then the accordion items are all expanded and accessible by default.
Also, there are several handy key binding to enable easier navigation, e.g. home
, end
, up
and down
arrow.
wp-content/plugins
Demonstration of Accordion block with the upcoming Twenty Twenty-Three theme.