Problem/Motivation

Nineteen anonymously reachable pages render with no h1 element at all. Verified on a fresh Drupal CMS + Educare install by fetching the raw markup as an anonymous visitor (grep -c '<h1' returns 0):

  • /events/upcoming
  • /events/past
  • 17 taxonomy term pages (/taxonomy/term/3, /taxonomy/term/11, /taxonomy/term/13, 16-22, 24-30)

A page with no top-level heading gives screen-reader and heading-navigation users no entry point, and breaks the document outline before it starts.

Root cause, confirmed: there is no page-title block placed in the vartheme_bs5_educare theme at all - a query over all block config for that theme returns zero blocks whose plugin id contains page_title. Educare instead ships the page title as a Canvas component (config/canvas.component.block.page_title_block.yml), placed per page inside the Canvas tree.

That works for every route rendered through Canvas - the home page, /about, /contact-us, /programs, node pages - which is why those all have exactly one h1. It leaves every non-Canvas route with nothing: views page displays and taxonomy term pages never get a title block.

The two events displays do have titles configured in the view (page_1 = 'Upcoming Events', page_2 = 'Past Events'); they simply are not rendered as a heading.

/programs is unaffected because the programs view has no page display - it is a Canvas page.

Related: #3622825 covers the same gap on Webform routes in the theme.

Steps to reproduce

  1. Install drupal/cms with the Educare site template.
  2. As an anonymous visitor, request /events/upcoming.
  3. Inspect the markup: no <h1> anywhere on the page.
  4. Compare with /about, which has exactly one.

Proposed resolution

Place a page-title block in the vartheme_bs5_educare theme for routes that Canvas does not own, so views and taxonomy pages get their h1. Whether that is a block with visibility conditions or a page region is for the maintainer to choose - the requirement is that every anonymously reachable route renders exactly one h1.

Remaining tasks

  • ✅ Reproduce and confirm the root cause.
  • ❌ Decide block placement vs page region.
  • ❌ Implement the change.
  • ❌ Re-check the full URL sweep afterwards; every route should report exactly one h1.
  • ❌ Reviewed by a human.
  • ❌ Code review by maintainers.

User interface changes

Views and taxonomy pages gain a visible page title.

API changes

None.

Data model changes

None.

Release notes snippet

Views and taxonomy term pages now render a page title, so every page has an h1.

Issue fork educare-3625285

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

rajab natshah created an issue. See original summary.

rajab natshah’s picture

Issue tags: -educare-1.0.3

  • rajab natshah committed 997b1cc2 on 1.0.x
    fix: #3625285 Render a heading on the views pages Canvas leaves without...
rajab natshah’s picture

Assigned: Unassigned » josebc
Status: Active » Needs review
Issue tags: +educare-1.0.4

✅ Released educare-1.0.4

rajab natshah’s picture

Assigned: josebc » mohammed j. razem
rajab natshah’s picture

Assigned: mohammed j. razem » Unassigned
Status: Needs review » 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.