Problem/Motivation

I think the way the "on this page" titles works, out of the box it is looking for H2s. A number of components are missing the ability to add titles and they are not able to be captured in "on this page".

  • Accordion
  • Slider
  • Content
  • iframe
  • webform
  • Callout
  • map
  • next step

There is also other inconsistencies. One this page links to slides in the slider but not the slider title. I realise that this can be overridden in the theming, but this is a very weird UX by defaultl Slides are generally secondary content and the key items for a page.

Slides inconsistent.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#2 civictheme-3456186-2.png168.15 KBsime

Comments

sime created an issue. See original summary.

sime’s picture

StatusFileSize
new168.15 KB
sime’s picture

Issue summary: View changes
alex.skrypnyk’s picture

Title: Missing titles and title inconsistency » TOC: Missing titles and title inconsistency
fionamorrison23’s picture

Version: 1.7.1 » 1.x-dev
richardgaunt’s picture

Agree, the slider component has a h3 for the title, and then each slide has a h2.

The selector table of contents is preprocessed in `_civictheme_preprocess_node__civictheme_page__full` - this can be overridden by a sub-theme.

I cannot think of a neat way to change this, we could do via theme settings but then it would be site wide, we could do via node but this feels like a bit complicated so will narrow this ticket down to fix the heading hierachy - and want to get away from hacking in business logic into the theme layer.

richardgaunt’s picture

Work completed here: https://github.com/civictheme/monorepo-drupal/pull/1492

We now have ability to choose heading level for slider (and thus included in TOC) and the slide headings are no longer included in TOC.

Thanks Sime for the issue

richardgaunt’s picture

Status: Active » Reviewed & tested by the community
richardgaunt’s picture

Version: 1.x-dev » 1.13.0
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.

Status: Fixed » Closed (fixed)

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