2014-12-03, 19:41, Smylers wrote:

The solution seems simple to me: Do not change the anchor id, ever.

But what if the original ID used had a typo in it?

Id attribute values are strings used for identification. Any “typo” in them is just part of the string.

Or a product name has to change for legal reasons?

That’s irrelevant. Id attribute values are not product names, or names at all. And I don’t think you are referring to any real case here.

It's entirely reasonable for anchors to be
‘meaningful-to-human’ IDs that are indicative of the section they are
labelling, and for section names to change over time.

Id attribute values are not meant to be understandable to humans. If you write them expecting them to be, you need to deal with the consequences. It is true that id attribute values may appear as part of URLs, but so do e.g. form field names and values, yet we are not worrying about setting aliases for them.

For instance, Wikipedia pages have an ID for each section which is based
on the section name. Every time somebody edits a section title, the
anchor changes ... and any external links specifically to that section
break.

If that is so, it is poor design and should be fixed at that level. The alternate id proposal would not help at all unless Wikipedia was changed to keep old id attribute values as alternate values. If you can persuade them to do that, try making them fix the original problem instead. It should be much simpler to make an id attribute value, once created, permanent than to introduce a new mechanism.

There are far too many broken links on the web of this form, where the
link goes to the correct page but includes a non-existent anchor.

The proposal would not help with that. Those links would remain broken. For any new content, which one is easier, to keep id attributes as they have once been assigned or to change them but turn old values to something to be appended to a list of alternate ids? Besides, all existing browsers would completely ignore the alternate id list, so it would take several years before they could be relied on.

Yucca

Reply via email to