Simple Accessible Spoilers


Create fully accessible content spoilers or accordions with a shortcode.

  1. Fully accessible to screen reader users
  2. Creates a flexible spoiler shortcode
  3. Define groups of accordions to close open accordions when another in the same group is opened.
  4. Override design in theme CSS files

Sample Code

[spoiler title="Sample Code" initial_state="expanded" tag="h2" group="a"]
Include content here


title: should include the clickable text to be displayed in your accordion
initial_state: values include collapsed or expanded, default to “collapsed”
group: any alphanumeric value. used to define a group of accordions. when one accordion is opened all other items in the group will be closed.
tag: values include any typical html tag but a heading tag should be used for accessibility, defaults to H2


  1. Install via WordPress Dashboard or upload;
  2. Activate the plugin through the ‘Plugins’ menu in WordPress;
  3. Use “spoiler” shortcode in your content;


How can I customize design of the spoiler?

Override the styles found in styles/simple-accessible-spoilers-styles.css in your theme css files


Não existem avaliações para esse plugin.

Colaboradores e desenvolvedores

“Simple Accessible Spoilers” é um software com código aberto. As seguintes pessoas contribuíram para este plugin.


Registro de alterações


  1. changed spoiler toggle role to link to correct validation issue
  2. corrected titles being stripped when they include accented characters


  1. Added attribute input validation


  1. Added option to group accordions so that opening a new accordion will close opened items in the same list.


  1. WordPress 5.5 Compatibility release


  1. corrected bug resulting in initial state not displaying correctly


  1. corrected php not object error when post object is not found in a page
  2. added jquery dependency to wp_register_script to correct jquery not being loaded in some themes


  1. corrected bug with scripts not enqueue as expected
  2. added dashboard messages