https://bugzilla.wikimedia.org/show_bug.cgi?id=9530

--- Comment #44 from Philippe Verdy <[email protected]> ---
You've stated to support HTML5, whch includes XHTML5. It will work as long as
the HTML5/XHTML5 parsers do not attempt to map its type to a name or to an XML
id. As long as the schema validator used keeps this attribute as an
unrestricted text type, and the HTML DOM accepts this (including through
Javascript), we can live with it.

But ensuring the uniqueness of id values is still a problem when you use
document.getElementById() and you don't know which element will be returned.
Apparently, browsers have implemented this Javascript API so that they will
return an array of elements if this ever occurs (and it's up to Javascript
applications to be aware that a single element *may* not be returned by this
call, just like with document.getElementByName()...). This means that the id
attribute duplicates the function of the name attribute now in (X)HTML5 and we
can ignore the non-working "validity" restrictions of XHTML1 and HTML4 or
before in their schema.

But we still need a way to create unique anchors which will remain readable and
more or less stable when linking between different articles. For now MediaWiki
does not track anchors (id's) that are referenced between articles, these
anchors are modified in articles without notice, and links from other articles
no longer work as expected. And MediaWiki still does not warn editors when we
have two sections showing the same heading in the same article, so we can fix
them to have working links, with readable anchors usable in other articles.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to