If I try to add a link as a form ( see Bug 36246 ) I cannot pass the data-confirmationMsg attribute with $('.submit-form-link').data(); This is because data attribute names always get read in lowercase.
Created attachment 168102 [details] [review] Bug 37190: HTML data attributes are always lowercase Test plan: 1. I don't really know how to write a good test plan for this one. 2. Review the changes, see if you agree.
Test plan: 1. Read https://html.spec.whatwg.org/multipage/dom.html#attr-data-* 2. Verify that M is an ASCII upper alpha :)
But... not sure why it works, but the example which landed with bug 36246 puts the message in the attribute data-confirmation-msg and that does work.
Oh, it works because of https://html.spec.whatwg.org/multipage/dom.html#dom-dataset - jQuery 3+, data-foo-bar is then accessible as fooBar, not the least little bit confusing.