Problem/Motivation

If a header is hidden via CSS, it would be nice to not process it by default in the TOC. See https://www.drupal.org/docs/getting-started/accessibility/hide-content-p...

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork toc_api-3571391

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

dave reid created an issue. See original summary.

dave reid’s picture

Status: Active » Needs review
anjuelsaphilip2020’s picture

StatusFileSize
new30.78 KB
new20.54 KB

Hi, I've verified and tested MR !36 and applied the patch successfully on TOC API 2.0.x-dev version. The changes are working as expected.
Following steps I followed:

  1. Go to Content → Add page/basic page.
  2. Add multiple headers to the content.
  3. Add multiple headers to the content: Visible headers, Hidden headers using CSS class visually-hidden.
  4. Observe the Table of Contents output.

Testing Result: After applying the patch, the TOC now excludes headers that are hidden via CSS, showing only visible headers.
Attaching screenshots for reference.
Thanks

anjuelsaphilip2020’s picture

Status: Needs review » Reviewed & tested by the community

joseph.olstad made their first commit to this issue’s fork.

joseph.olstad’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

joseph.olstad’s picture

FYI: I've tagged this and put it into an RC1 release
2.0.2-rc1

https://www.drupal.org/project/toc_api/releases/2.0.2-rc1

Feedback is appreciated!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.