Skip to content

colorful-tones/acf-accordion-block

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
src
 
 
 
 
 
 
 
 

Accordion block using ACF PRO fields

An accessible accordion block that uses ACF PRO fields. The interactivity of the accordion comes from 10up's Component Library.

Accessibility (a11y)

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.

How to use?

  1. Download the latest release or direct (.zip).
  2. Install ACF Pro plugin and activate.
  3. Place the download in your site's wp-content/plugins
  4. Activate ACF Accordion Block.
  5. Create a new page, post and add the Accordion block.

Demonstration of Accordion block with the upcoming Twenty Twenty-Three theme. Gif demonstrating accordion block use