Skip to content

Commit b96c787

Browse files
committed
Release 7.0.2 with hidden TOC ARIA fix
1 parent 19ef492 commit b96c787

9 files changed

Lines changed: 17 additions & 10 deletions

File tree

build/block.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "https://schemas.wp.org/trunk/block.json",
33
"apiVersion": 3,
44
"name": "simpletoc/toc",
5-
"version": "7.0.1",
5+
"version": "7.0.2",
66
"title": "SimpleTOC",
77
"category": "layout",
88
"icon": "<svg clip-rule='evenodd' fill-rule='evenodd' stroke-linejoin='round' stroke-miterlimit='2' viewBox='0 0 500 500' xmlns='http://www.w3.org/2000/svg'><path d='m365.983 78.248c2.72-32.415 29.921-57.908 63.029-57.908 34.91 0 63.253 28.342 63.253 63.252s-28.343 63.252-63.253 63.252v269.582c0 25.232-20.485 45.718-45.718 45.718h-313.62c-25.233 0-45.719-20.486-45.719-45.718v-292.46c0-25.233 20.486-45.718 45.719-45.718z' fill='#070D0D'/><g fill='#fff'><path d='m423.898 112.744v-24.188h-24.008v-10.108h24.008v-24.008h10.229v24.008h24.008v10.108h-24.008v24.188z'/><path d='m120.04 403.105c-16.883 0-30.511-13.719-30.511-30.714 0-16.79 13.628-30.714 30.511-30.714 16.679 0 30.511 13.924 30.511 30.714 0 16.995-13.832 30.714-30.511 30.714z'/><path d='m170.891 362.153h183.063v20.476h-183.063z'/><path d='m120.04 300.725c-16.883 0-30.511-13.719-30.511-30.714 0-16.79 13.628-30.714 30.511-30.714 16.679 0 30.511 13.924 30.511 30.714 0 16.995-13.832 30.714-30.511 30.714z'/><path d='m170.891 259.773h183.063v20.476h-183.063z'/><path d='m120.04 198.345c-16.883 0-30.511-13.719-30.511-30.714 0-16.791 13.628-30.714 30.511-30.714 16.679 0 30.511 13.923 30.511 30.714 0 16.995-13.832 30.714-30.511 30.714z'/><path d='m170.891 157.393h183.063v20.476h-183.063z'/></g></svg>",

build/index.asset.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-editor', 'wp-element', 'wp-i18n', 'wp-primitives', 'wp-server-side-render'), 'version' => 'e87d1713e351960773a2');
1+
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-editor', 'wp-element', 'wp-i18n', 'wp-primitives', 'wp-server-side-render'), 'version' => '0760e76aa117a72efc72');

build/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

changelog.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
== Changelog ==
22

3+
= 7.0.2 =
4+
* Fixed: Removed an invalid `aria-labelledby` reference from hidden TOC `<details>` markup and now rely on native `<summary>` labeling.
5+
36
= 6.6.1 =
47
* Added: Initialize the JavaScript for the TOC accordion on page load or after the document has fully loaded. Thanks blronaldhuereca https://github.com/mtoensing/simpletoc/pull/63
58

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "simpletoc",
3-
"version": "7.0.1",
3+
"version": "7.0.2",
44
"author": "Marc Tönsing",
55
"description": "SEO-friendly Table of Contents Gutenberg block. No JavaScript or CSS by default.",
66
"main": "build/index.js",

plugin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: SimpleTOC - Table of Contents Block
44
* Plugin URI: https://marc.tv/simpletoc-wordpress-inhaltsverzeichnis-plugin-gutenberg/
55
* Description: SEO-friendly Table of Contents Gutenberg block. No JavaScript or CSS by default.
6-
* Version: 7.0.1
6+
* Version: 7.0.2
77
* Author: Marc Tönsing
88
* Author URI: https://toensing.com
99
* Text Domain: simpletoc
@@ -764,7 +764,7 @@ function add_hidden_markup_start( $html, $attributes, $itemcount, $alignclass )
764764

765765
if ( $is_hidden_enabled ) {
766766
$title_text = $attributes['title_text'] ? esc_html( trim( $attributes['title_text'] ) ) : esc_html__( 'Table of Contents', 'simpletoc' );
767-
$hidden_start = '<details id="simpletoc-details" class="simpletoc" aria-labelledby="simpletoc-title">
767+
$hidden_start = '<details class="simpletoc">
768768
<summary style="cursor: pointer;">' . $title_text . '</summary>';
769769
$html .= $hidden_start;
770770
}

readme.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Contributors: MarcDK
33
Tags: TOC, Table of Contents, Block, Accessibility, Table
44
Requires at least: 5.9
55
Tested up to: 6.9
6-
Stable tag: 7.0.1
6+
Stable tag: 7.0.2
77
Requires PHP: 7.3
88
License: GPLv2 or later
99
License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -33,6 +33,7 @@ The maximum depth of the toc can be configured in in the blocks' sidebar among m
3333
= Accessibility =
3434

3535
This plugin is designed & developed for WCAG 2.2 level AA conformance. The plugin is tested with assistive technology and intended to be accessible, however some third party plugins or themes may affect the individual accessibility on a given website. If you find an accessibility issue, please [let us know](https://github.com/mtoensing/simpletoc/issues) and we'll try to address it promptly.
36+
Hidden TOCs use native `<details>` and `<summary>` semantics without extra ARIA references that require custom IDs.
3637

3738
= Features =
3839

@@ -72,6 +73,9 @@ SimpleTOC is open-source and developed on [GitHub Pages](https://github.com/mtoe
7273

7374
== Changelog ==
7475

76+
= 7.0.2 =
77+
* Fixed: Removed an invalid `aria-labelledby` reference from hidden TOC `<details>` markup and now rely on native `<summary>` labeling.
78+
7579
= 7.0.1 =
7680
* Added: Direct link from the Advanced Features sidebar to the global SimpleTOC settings.
7781
* Fixed: Global settings link now appears reliably in the editor sidebar.

src/block.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "https://schemas.wp.org/trunk/block.json",
33
"apiVersion": 3,
44
"name": "simpletoc/toc",
5-
"version": "7.0.1",
5+
"version": "7.0.2",
66
"title": "SimpleTOC",
77
"category": "layout",
88
"icon": "<svg clip-rule='evenodd' fill-rule='evenodd' stroke-linejoin='round' stroke-miterlimit='2' viewBox='0 0 500 500' xmlns='http://www.w3.org/2000/svg'><path d='m365.983 78.248c2.72-32.415 29.921-57.908 63.029-57.908 34.91 0 63.253 28.342 63.253 63.252s-28.343 63.252-63.253 63.252v269.582c0 25.232-20.485 45.718-45.718 45.718h-313.62c-25.233 0-45.719-20.486-45.719-45.718v-292.46c0-25.233 20.486-45.718 45.719-45.718z' fill='#070D0D'/><g fill='#fff'><path d='m423.898 112.744v-24.188h-24.008v-10.108h24.008v-24.008h10.229v24.008h24.008v10.108h-24.008v24.188z'/><path d='m120.04 403.105c-16.883 0-30.511-13.719-30.511-30.714 0-16.79 13.628-30.714 30.511-30.714 16.679 0 30.511 13.924 30.511 30.714 0 16.995-13.832 30.714-30.511 30.714z'/><path d='m170.891 362.153h183.063v20.476h-183.063z'/><path d='m120.04 300.725c-16.883 0-30.511-13.719-30.511-30.714 0-16.79 13.628-30.714 30.511-30.714 16.679 0 30.511 13.924 30.511 30.714 0 16.995-13.832 30.714-30.511 30.714z'/><path d='m170.891 259.773h183.063v20.476h-183.063z'/><path d='m120.04 198.345c-16.883 0-30.511-13.719-30.511-30.714 0-16.791 13.628-30.714 30.511-30.714 16.679 0 30.511 13.923 30.511 30.714 0 16.995-13.832 30.714-30.511 30.714z'/><path d='m170.891 157.393h183.063v20.476h-183.063z'/></g></svg>",

0 commit comments

Comments
 (0)