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 22043 - attribute "name" deprecation in div and other elements, but dataset API is not providing dataset searching/traversal functions
Summary: attribute "name" deprecation in div and other elements, but dataset API is no...
Status: VERIFIED WONTFIX
Alias: None
Product: HTML WG
Classification: Unclassified
Component: HTML5 spec (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords: TrackerRequest
Depends on:
Blocks:
 
Reported: 2013-05-15 12:47 UTC by DaLiV
Modified: 2013-06-11 12:58 UTC (History)
4 users (show)

See Also:


Attachments

Description DaLiV 2013-05-15 12:47:17 UTC
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
Comment 1 Robin Berjon 2013-06-11 11:56:05 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: none
Rationale:

I understand the use case that you have, but using @name for this is not the best approach. You should look at the data-* attributes and the corresponding dataset API.
Comment 2 DaLiV 2013-06-11 12:58:26 UTC
already was looked into the data-* attributes and the dataset API - no search ways provided and even mentioned.
- described previously by globalization of "name" attribute not liked to "EDITOR" = ok
- as function "namedItem" is closely related to "name" so that MUST BE also DEPRECATED and instead of that provided one universal dataset API (currently not implemented at all) = "DEPRECATION must be also enforced" based on previous point
- mentioned "best approach" of writing functions in any scripted language for each web page also is not "best approach". 

functions for dataset searching/traversal must be standartized and implemented prior to deprecation of existing functionality.

so additional SUGGESTION: implement into dataset API universal search/traverse functions of data-*