[Bug 22043] New: attribute "name" deprecation in div and other elements

https://www.w3.org/Bugs/Public/show_bug.cgi?id=22043

            Bug ID: 22043
           Summary: attribute "name" deprecation in div and other elements
    Classification: Unclassified
           Product: HTML.next
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: default
          Assignee: dave.null@w3.org
          Reporter: DaLiV@apollo.lv
        QA Contact: public-html-bugzilla@w3.org
                CC: mike@w3.org, robin@w3.org

in some elements deprecated attribute "name"

mine suggestion: make "name" tag as "Global attribute" similar as "id"
first are good for identification in similar blocks but second already works as
unique in document

on example:

---
<div id=row1>
 <div name=field1>11</div><div name=field2>12</div><div name=field3>13</div>
 <div onclick='javascript:doOper(this);'>test</div>
</div>
<div id=row2>
 <div name=field1>21</div><div name=field2>22</div><div name=field3>23</div>
 <div onclick='javascript:doOper(this);'>test</div>
</div>
<div id=row3>
 <div name=field1>31</div><div name=field2>32</div><div name=field3>33</div>
 <div onclick='javascript:doOper(this);'>test</div>
</div>
---
in this case script may be UNIFIED to something similar to:
---
<script>
function doOper(id){
    row=id.parentNode;
    alert(
        row.getElementsByTagName('div').namedItem('field1').innerHTML+':'+
        row.getElementsByTagName('div').namedItem('field2').innerHTML+':'+
        row.getElementsByTagName('div').namedItem('field3').innerHTML
    );
}
</script>
---

and if that deprecation will stay inplace - then html looks as:
----
<div id=row1>
 <div id=field11>11</div>
 <div id=field12>12</div>
 <div id=field13>13</div>
</div>
<div id=row2>
 <div id=field21>21</div>
 <div id=field22>22</div>
 <div id=field23>23</div>
</div>
<div id=row3>
 <div id=field31>31</div>
 <div id=field32>32</div>
 <div id=field33>33</div>
</div>
----
but scripting complexity will be much more unprognosable - as id must be unique
in all document
as will be needed to extract data of hierarhical location or stripping from
name some part - that are all escessive operations caused by deprecation

alternate way not provided for such constructions, that quite critical as made
editable divs, spans,..., but hierarhical identification is loose in
specification


P.S. sorry for language

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Wednesday, 15 May 2013 12:47:19 UTC