Skip to content

Commit

Permalink
added id for aria controls
Browse files Browse the repository at this point in the history
  • Loading branch information
mtoensing committed Sep 10, 2023
1 parent 3e8e2fc commit 73b7ed9
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "simpletoc",
"version": "6.0.8",
"version": "6.0.9",
"author": "Marc Tönsing",
"description": "SEO-friendly Table of Contents Gutenberg block. No JavaScript and no CSS means faster loading.",
"main": "build/index.js",
Expand All @@ -23,7 +23,7 @@
},
"devDependencies": {
"@wordpress/env": "^8.7.0",
"@wordpress/scripts": "26.12.0"
"@wordpress/scripts": "^26.12.0"
},
"dependencies": {
"@wordpress/i18n": "^4.41.0",
Expand Down
8 changes: 4 additions & 4 deletions plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Plugin Name: SimpleTOC - Table of Contents Block
* Plugin URI: https://marc.tv/simpletoc-wordpress-inhaltsverzeichnis-plugin-gutenberg/
* Description: SEO-friendly Table of Contents Gutenberg block. No JavaScript and no CSS means faster loading.
* Version: 6.0.8
* Version: 6.0.9
* Author: Marc Tönsing
* Author URI: https://marc.tv
* Text Domain: simpletoc
Expand Down Expand Up @@ -589,15 +589,15 @@ function enqueue_accordion_frontend()
'simpletoc-accordion',
plugin_dir_url(__FILE__) . 'src/accordion.js',
array(),
'6.0.8',
'6.0.9',
true
);

wp_enqueue_style(
'simpletoc-accordion',
plugin_dir_url(__FILE__) . 'src/accordion.css',
array(),
'6.0.8'
'6.0.9'
);
}

Expand All @@ -618,7 +618,7 @@ function add_accordion_start($html, $attributes, $itemcount, $alignclass)
if ($isAccordionEnabled) {
enqueue_accordion_frontend();
$titleText = esc_html(trim($attributes['title_text'])) ?: __('Table of Contents', 'simpletoc');
$accordionStart = '<h2 style="margin: 0;"><button type="button" aria-expanded="false" aria-controls="simpletoc-content" class="simpletoc-collapsible">' . $titleText . '</button></h2><div class="simpletoc-content">';
$accordionStart = '<h2 style="margin: 0;"><button type="button" aria-expanded="false" aria-controls="simpletoc-content-container" class="simpletoc-collapsible">' . $titleText . '</button></h2><div id="simpletoc-content-container" class="simpletoc-content">';
$accordionEnd = '</div>';
}

Expand Down
4 changes: 2 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Tags: Gutenberg, block, TOC, Table of Contents, AMP
Requires at least: 5.9
Donate link: https://marc.tv/out/donate
Tested up to: 6.3
Stable tag: 6.0.8
Stable tag: 6.0.9
Requires PHP: 7.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -50,7 +50,7 @@ SimpleTOC is open-source and developed on [GitHub Pages](https://github.com/mtoe

== Changelog ==

= 6.0.8 =
= 6.0.9 =
* Added ARIA accessibility labels for the accordion. Thanks Amber Hinds!
* Fixed: Caching of accordion JavaScript. Thanks jghitchcock!
* Added correct ARIA controls attribute.
Expand Down

0 comments on commit 73b7ed9

Please sign in to comment.