Validation: attribute 'data-dojo-type' is not a valid attribute of element 'button'

1604
11
Jump to solution
01-03-2014 08:06 AM
ShaningYu
Frequent Contributor
Got several warnings on <button ... > <div ... >, etc., such as:
attribute 'data-dojo-type' is not a valid attribute of element 'button'
attribute 'data-dojo-props' is not a valid attribute of element 'button'
attribute 'data-dojo-type' is not a valid attribute of element 'div'
attribute 'data-dojo-props' is not a valid attribute of element 'div'
How can those problems be handled?  Thanks.
0 Kudos
1 Solution

Accepted Solutions
JonathanUihlein
Esri Regular Contributor
Great!

Those errors should go away when you change the doctype of your webpage to the HTML5 standard:

<!DOCTYPE html>

View solution in original post

0 Kudos
11 Replies
ShaningYu
Frequent Contributor
Referring the thread at http://forums.arcgis.com/threads/12911-Warnings-why, I did
<%--<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">--%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
Namely, change to 4.01.  The warning messages were gone.  Thanks.
0 Kudos
JonathanUihlein
Esri Regular Contributor
I believe 'data-*' is a valid property on HTML5 elements.

Is your webpage in HTML5?

* * *

Read more here about Dojo-specific data props:
http://www.sitepen.com/blog/2012/01/19/html5-data-dojo-attribute-support/

Read more about HTML5 data props:
http://ejohn.org/blog/html-5-data-attributes/


*edit

You posted while I was posting; my suspicion was correct 😃

Is there any reason you aren't using HTML5?
0 Kudos
ShaningYu
Frequent Contributor
Ideally, I should use HTML5.  I need investigate more.  Thanks for you to remind me.  I have turned he Q as not answered.
0 Kudos
JonathanUihlein
Esri Regular Contributor
Great!

Those errors should go away when you change the doctype of your webpage to the HTML5 standard:

<!DOCTYPE html>
0 Kudos
ShaningYu
Frequent Contributor
Changed to
<!DOCTYPE html>

still shows not a valid attribute.
0 Kudos
JonathanUihlein
Esri Regular Contributor
Interesting! What browser and what specific version are you using?
0 Kudos
ShaningYu
Frequent Contributor
Run in IE 8
0 Kudos
SteveCole
Frequent Contributor
Given that IE-8 scores a whopping 43 out of a possible 555 points on http://html5test.com/ maybe that's the problem right there?
0 Kudos
JonathanUihlein
Esri Regular Contributor
Given that IE-8 scores a whopping 43 out of a possible 555 points on http://html5test.com/ maybe that's the problem right there?


Indeed.... I'm not sure those warnings will ever go away when viewing your web application in IE8.
0 Kudos