[Bug 1784] Send warning for duplicated name attribute value

http://www.w3.org/Bugs/Public/show_bug.cgi?id=1784


ot@w3.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement
         OS/Version|Windows XP                  |All
           Priority|P2                          |P4
           Platform|PC                          |All
            Summary|Duplicated anchor name      |Send warning for duplicated
                   |                            |name attribute value




------- Additional Comments From ot@w3.org  2005-07-20 04:37 -------
(In reply to comment #0)
> Duplicated use of an anchor name cannot be detected.
> For example, it passes the HTML code below:
> 
> <a name="top">Anchor 1</a>
> <a name="top">Anchor 2</a>

the "name" attribute is of type name, which means that unlike the "id" attribute, the name attribute has 
no constraint of uniqueness. As a result, the above is valid, and the validator parses it as such.

In an attempt at usefulness, one could imagine that the validator could throw a warning when detecting 
a duplicate name attribute. I am changing the bug title to show this idea, and marking it as 
enhancement request.

Note that in XHTML, the name attribute is deprecated.
http://www.w3.org/TR/xhtml1/#h-4.10

 The HTML compatibility guidelines recommend to use name="foo" id="foo". This recommendation is 
also a good idea for HTML4.
http://www.w3.org/TR/xhtml1/#C_8

Received on Wednesday, 20 July 2005 04:38:02 UTC