https://bugzilla.wikimedia.org/show_bug.cgi?id=20495
Summary: Support HTML5 data-* attributes
Product: MediaWiki
Version: unspecified
Platform: All
URL: http://www.whatwg.org/specs/web-apps/current-
work/multipage/dom.html#embedding-custom-non-visible-
data
OS/Version: All
Status: NEW
Keywords: easy
Severity: enhancement
Priority: Normal
Component: Page rendering
AssignedTo: [email protected]
ReportedBy: [email protected]
HTML5 has a handy new feature. data-* attributes.
Lowercase attributes starting with data- are reserved by HTML5 for sites to
store custom data in for use by their scripts (not for external use, and
browsers are prohibited from giving them any special meaning).
HTML5 does define an elm.dataset used for getting data from those data-
attributes, but that's not necessary to rely on as data- attributes can be
extracted the same way as
For a long period of time we've rejected html attributes from elements (except
for a select few) to avoid people placing on* attributes, or other special
attributes which may be interpreted by the browser in a way that could harm the
reader.
As a result scripts like show/hide, and piles of others have resorted to
abusing the class tag to pass config data to scripts.
HTML5 now defines data- as something which is safe to use. I think we should
tweak the parser to allow data- attributes to be used inside markup, this way
instead of abusing css classes scripts can make use of data- attributes to
control their behavior.
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l