You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the APA & WHATWG joint meeting at TPAC today we discussed the usage of data-* attributes. The reason for not using data-* is that those attributes are intended store information that is private to the page. The HTML standard says:
Custom data attributes are intended to store custom data, state, annotations, and similar, 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 not known to the administrators of the site that uses the attributes. For generic extensions that are to be used by multiple independent tools, either this specification should be extended to provide the feature explicitly, or a technology like microdata should be used (with a standardized vocabulary).
There seemed to be a preference in the meeting for the adapt- prefix. I promised to research usage in HTTP Archive for such attributes, which I've now done. I also looked for ssml- while at it.
The result is that out of the 15,000,000 pages in the dataset, there are 19 pages which use an attribute adapt-container-width="true". There were no ssml- prefixed attributes.
Conclusion: it should be web compatible to use adapt- and ssml- as prefixes.
query and detailed result
SELECT
*
FROM (
SELECT
page,
ARRAY_TO_STRING(REGEXP_EXTRACT_ALL(body, r'(?i)(<[a-z][a-z0-9_-]*(?:\s+[^>]+)*\s+(?:adapt|ssml)-[a-z0-9_-]*[^>]*>)'), "\n") AS match
FROM
`httparchive.response_bodies.2022_08_01_mobile`
WHERE
page = url )
WHERE
match != ""
Someone asked in the meeting if there's a list of all prefixed attributes that exist, which I had actually researched a few years ago: whatwg/html#2271 (comment)
Thank you @zcorpan for researching this and letting us know; this is great news. I am sure the Adapt Task Force will be filing an issue over on the HTML repo in order to begin dialogue with the WHATWG in due course.
I think that may've been me asking the question about the list of prefixed attributes. I'm also quite interested in searching the archive as part of our further development of the Adapt spec, and in relation to a separate personal project relating to landmark regions, so thanks for the pointers to those results, the docs, and the queries you used.
At the APA & WHATWG joint meeting at TPAC today we discussed the usage of
data-*
attributes. The reason for not usingdata-*
is that those attributes are intended store information that is private to the page. The HTML standard says:There seemed to be a preference in the meeting for the
adapt-
prefix. I promised to research usage in HTTP Archive for such attributes, which I've now done. I also looked forssml-
while at it.The result is that out of the 15,000,000 pages in the dataset, there are 19 pages which use an attribute
adapt-container-width="true"
. There were nossml-
prefixed attributes.Conclusion: it should be web compatible to use
adapt-
andssml-
as prefixes.query and detailed result
Result: https://docs.google.com/spreadsheets/d/1cFW6vGH5u3qgFyP2a3AvNkDCkKobWlhc_lI6_djCYkY/edit?usp=sharing
Note that the results contain false positives with e.g.
adapt-*
inclass=""
.The text was updated successfully, but these errors were encountered: