This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 9593 - Anchors in spec are not consistent
Summary: Anchors in spec are not consistent
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: LC1 HTML5 spec (show other bugs)
Version: unspecified
Hardware: All All
: P2 minor
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-26 19:51 UTC by Jirka Kosek
Modified: 2011-08-04 05:02 UTC (History)
4 users (show)

See Also:


Attachments
Section id -> Element mapping (3.14 KB, application/json)
2010-05-28 16:21 UTC, Ms2ger
Details

Description Jirka Kosek 2010-04-26 19:51:26 UTC
Definition of most element is preceded by anchor in a for the-xxx-element and similarly for attributes (the-xxx-attribute). However I have found that some attributes doesn't follow this pattern. For example for contenteditable there is just contenteditable anchor, not the-contenteditable-attribute.

This naming schema should be 100% consistent in order to allow easy linking to definition of element/attributes from other specs and reference materials.

It this is not feasible I would as editor to provide XML file with mapping from attribute/element name to an appropriate anchor label.
Comment 1 Ms2ger 2010-05-28 16:21:19 UTC
Created attachment 885 [details]
Section id -> Element mapping

I would say that keeping existing links intact is more important than consistency <http://www.w3.org/Provider/Style/URI>...

However, here's a section id -> element mapping. Hope it's useful.
Comment 2 Ian 'Hixie' Hickson 2010-08-17 18:46:08 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Rejected
Change Description: no spec change
Rationale: The section IDs are mostly auto-generated by Anolis. As Ms2ger says, consistency over time is more important here.

If you really want a mapping of elements of IDs, I'd rather wait until the spec is really stable before providing one, since otherwise it'll just keep going out of date as the auto-generated IDs change. If you rely on a specific ID, let me know and I can freeze it by explicitly listing it in the source.
Comment 3 Jirka Kosek 2010-08-17 20:07:15 UTC
> Rationale: The section IDs are mostly auto-generated by Anolis.
> As Ms2ger says, consistency over time is more important here.

Well if inconsistent IDs were generated at the start there is no reason to takeover this legacy forever. You can assign consistent IDs in the form "the-xxx-element|attribute" where irregular IDs are used and put additional <a name="original-id"> in the place to make sure that old links works.
Comment 4 Ian 'Hixie' Hickson 2010-08-18 01:16:09 UTC
Is there a good reason to spend the effort to do this? Or is it just a matter of wanting things to be pretty?
Comment 5 Jirka Kosek 2010-08-18 08:29:18 UTC
IMHO there is a good reason. For example I do a lot of training. In supplement materials (authored in XML) I can enclose each HTML tag like

...<tag>table</tag>...

which is then transformed to

...<a href="http://dev.w3.org/html5/spec/Overview.html#the-table-element">table</a>...

so it is easy to navigate to definition of element in spec. In past I have done so for many other languages and it was easy because mapping from element name to URI was straightforward.

So I think it is worth effort, especially given that irregularly named are just few elements.

Thanks in advance,

Jirka
Comment 6 Ian 'Hixie' Hickson 2010-08-18 17:58:42 UTC
Ok, list the ones you want me to fix, and I'll go through and move the current id=""s for those to be on a slightly different element so that the auto-generated ID works also.
Comment 7 Ian 'Hixie' Hickson 2010-08-26 18:41:28 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Did Not Understand Request
Change Description: no spec change
Rationale: See comment 6. I'm happy to do this, just let me know the IDs to fix and reopen the bug. (I'm just marking this NEEDSINFO so that it isn't on my list in the meantime.)
Comment 8 Jirka Kosek 2011-02-10 21:46:27 UTC
The following elements doesn't use regular anchor name (the-xxx-element):

audio
command
h1
h2
h3
h4
h5
h6
head
html
menu
meta
script
sub
sup
title
video

I have tried to find inconsistencies in attribute anchors as well, but it seems that there is much larger variety as attributes are sometimes depending on element where they are used and some attributes are shared between several elements. Although it would be great to have this unified as well I'm not insisting on this change for attributes now as it's not so common to create general links to attributes.

Ian, thanks in advance for this small improvement.

Jirka
Comment 9 Ian 'Hixie' Hickson 2011-05-03 19:18:53 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Accepted
Change Description: see diff given below
Rationale: Concurred with reporter's comments.
Comment 10 contributor 2011-05-03 19:19:13 UTC
Checked in as WHATWG revision r6050.
Check-in comment: make ids more consistent (this might break some links, sorry)
http://html5.org/tools/web-apps-tracker?from=6049&to=6050
Comment 11 contributor 2011-05-03 22:05:06 UTC
Checked in as WHATWG revision r6058.
Check-in comment: make more ids consistent
http://html5.org/tools/web-apps-tracker?from=6057&to=6058
Comment 12 Michael[tm] Smith 2011-08-04 05:02:37 UTC
mass-moved component to LC1