speced / speced/respec

Sections getting different ids from their headings

Open
#4,947 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
JavaScript
Stars
806
Forks
434
Avg merge
1d 21h
Merged PRs (30d)
32

Description

Description of problem

URL to affected spec or repo:

https://w3ctag.github.io/privacy-principles/#hl-sensitive-information

What happened (e.g., it crashed)?:

The source for this heading is

## Sensitive Information {#hl-sensitive-information}

This generates:

<section id="sensitive-information"><div class="header-wrapper">
<h3 id="hl-sensitive-information"><bdi class="secno">2.4 </bdi>Sensitive Information</h3>
<a class="self-link" href="#hl-sensitive-information" aria-label="Permalink for Section 2.4"></a> ...

This causes https://w3c.github.io/webref/ed/headings/privacy-principles.json to omit the id that the self-link refers to. (Filed as https://github.com/w3c/reffy/issues/1824)

Expected behavior (e.g., it shouldn't crash):

Only 1 id should be generated for this section/heading, and it should match the id assigned by the custom heading id.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the heading case from the linked privacy-principles index.html source, including ## Sensitive Information {#hl-sensitive-information}. Trace ReSpec’s heading generation and custom heading ID handling, then verify the rendered section and heading produce one matching id and that the resulting headings JSON retains the self-link target.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.