Re: problem with data-

I believe the data- attribute is essentially meta data.

MDN Web Docs have them most robust description that I have seen:

https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attributes

https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/dataset
[https://developer.mozilla.org/static/img/opengraph-logo.72382e605ce3.png]<https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/dataset>

HTMLElement.dataset - Web APIs | MDN<https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/dataset>
The dataset property on the HTMLElement interface provides read/write access to all the custom data attributes (data-*) set on the element. This access is available both in HTML and within the DOM. It is a map of DOMString, one entry for each custom data attribute. Note that the dataset property itself can be read, but not directly written.. Instead, all writes must be to the individual ...
developer.mozilla.org


[https://developer.mozilla.org/static/img/opengraph-logo.72382e605ce3.png]<https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attributes>

Using data attributes - Learn web development | MDN<https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attributes>
HTML5 is designed with extensibility in mind for data that should be associated with a particular element but need not have any defined meaning. data-* attributes allow us to store extra information on standard, semantic HTML elements without other hacks such as non-standard attributes, extra properties on DOM, or Node.setUserData(). HTML syntax. The syntax is simple.
developer.mozilla.org





________________________________
From: Janina Sajka <janina@rednote.net>
Sent: Monday, March 11, 2019 8:20 AM
To: lisa.seeman
Cc: public-personalization-tf
Subject: Re: problem with data-

I can't provide a definitive answer. However, I suggest those two
statements are a bit confused on their face.

Statement 1 refers to "... private to the page or application."

Statement 2 refers to "software that is independent of the site."

So we have the terms "application" and "software." I suggest those are
essentially synonymous. That leaves us with the question of what
"independent" means.

So, my conclusion becomes we're OK. We're consuming the web site in a
user appropriate manner. Imo, that's not an "independent" use.

Just my two cents (American).

Janina

Lisa Seeman writes:
> Folks, are we braking the html standard by using data- attributes?
>
>
>
> I quote
>
>
>
> "
>
>
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.w3.org%2FTR%2Fhtml50%2Fdom.html%23custom-data-attribute&amp;data=02%7C01%7C%7C0810b20a029f4365d99e08d6a635281e%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636879144564059393&amp;sdata=XrAMwyN5M8I5Zw5rZyh%2BhgQxFZ15lC2twb3oBg4A6aI%3D&amp;reserved=0 are intended to store custom data private to the page or application, for which there are no more appropriate attributes or elements.
>
> These attributes are not intended for use by software that is independent of the site that uses the attributes.
>
> "
>
>
>
>
>
>
>
>
> >From w3c schools (IE out in the wieled...)
> "
> Note: Custom attributes prefixed with "data-" will be completely ignored by the user agent."
>
>
>
> In pother words we are going against how dat- is intended to be used.
>
>
>
>
>
> All the best
>
>
>
> Lisa Seeman
>
>
>
> https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fil.linkedin.com%2Fin%2Flisaseeman%2F&amp;data=02%7C01%7C%7C0810b20a029f4365d99e08d6a635281e%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636879144564059393&amp;sdata=6uy4jVHy7dIIfkOyZD0cio76pW%2FS3m1gBoZ7i7yO6Ms%3D&amp;reserved=0, https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftwitter.com%2FSeemanLisa&amp;data=02%7C01%7C%7C0810b20a029f4365d99e08d6a635281e%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636879144564069404&amp;sdata=LVXAu%2FaDCmCj%2FM1qC027PgZw7u%2Fv3MHpOXkN36RuduU%3D&amp;reserved=0

--

Janina Sajka

Linux Foundation Fellow
Executive Chair, Accessibility Workgroup:       https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fa11y.org&amp;data=02%7C01%7C%7C0810b20a029f4365d99e08d6a635281e%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636879144564069404&amp;sdata=io3hjFxCLGiaC3E%2BzIJNh5o3ypssWJaVKxCR%2FjkwaLg%3D&amp;reserved=0

The World Wide Web Consortium (W3C), Web Accessibility Initiative (WAI)
Chair, Accessible Platform Architectures        https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2Fwai%2Fapa&amp;data=02%7C01%7C%7C0810b20a029f4365d99e08d6a635281e%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636879144564069404&amp;sdata=Ylh3m1l685L5DKMnyyb%2FyjaV7XpXXdfO39Cmzjl4RMg%3D&amp;reserved=0

Received on Monday, 11 March 2019 15:30:34 UTC