Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More flexible title id generation #4712

Open
egekorkan opened this issue May 15, 2024 · 8 comments
Open

More flexible title id generation #4712

egekorkan opened this issue May 15, 2024 · 8 comments
Labels

Comments

@egekorkan
Copy link

Description of problem

URL to affected spec or repo:

https://w3c.github.io/wot-thing-description/ontology/td

What happened (e.g., it crashed)?: ReSpec always inserts the id title for the document title. However, if there is already a section id with value title in the document, it causes issues with linking to that section.

Expected behavior (e.g., it shouldn't crash): In such cases, respec should display a warning. It can also try to iterate and add title2 etc. Even better would be a configuration option to set a custom title id.

Optional, steps to reproduce:

  1. Go to https://w3c.github.io/wot-thing-description/ontology/td#title
  2. Expect to land at section 4.3.12 but the window moves to the top of the page, i.e. to the document title

Note: I am not sure why the title needs an id. Maybe removing that addition of the id can make sense?

@egekorkan egekorkan added the bug label May 15, 2024
@marcoscaceres
Copy link
Contributor

marcoscaceres commented May 16, 2024

I think the W3C pub rules checker needs id=“title” iirc.

@marcoscaceres
Copy link
Contributor

And yeah, that’s weird if it’s not detecting the collision. Is that second title explicitly set to id=title?

@marcoscaceres
Copy link
Contributor

Yeah, the document is explicitly setting the id:

<section id="title"><h4>title</h4>

Respec won't override author's id. You will need to set it to something else (otherwise w3c pub rules will also break)

@egekorkan
Copy link
Author

I think the W3C pub rules checker needs id=“title” iirc.

Ok I did not know that. Do we know why they need it? As a first solution we have removed it from our publications.

Is that second title explicitly set to id=title?

Yes since it is a vocabulary term of our information model and it is linked by external documents as well so we cannot change it.

@egekorkan
Copy link
Author

egekorkan commented May 16, 2024

@marcoscaceres
Copy link
Contributor

marcoscaceres commented May 16, 2024

To be sure, that’s the html validator (not the w3c pub rules). However, let me check about the id.

@marcoscaceres marcoscaceres reopened this May 16, 2024
@egekorkan
Copy link
Author

@marcoscaceres
Copy link
Contributor

Ok, thanks for also checking. Seems I had misremembered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants