This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The following HTML5 fragment fails to validate with a "Bad value submit for attribute type on element button" error message, whereas said value is perfectly valid according to HTML5 specs: <form id="action1" action="/"></form> <button form="action1" type="submit">Submit</button>
Link to current spec: http://dev.w3.org/html5/spec-author-view/the-button-element.html#attr-button-type-submit
Also when omitting the type attribute (which should default to type="submit" anyway, according to the aforementioned document) the validator complains a required attribute is missing.
I can't reproduce this with the markup fragment you provided.
Julien, If you can please re-check your doc at http://validator.w3.org/nu/ I'd appreciate it. Over the last 10 days or so I had been making some changes to the the validator HTML5 backend, and that might have left things in an unstable state that caused the problem you reported. But I now have things synced up and stable, so I think you should not see this problem again. But please let me know if you can still reproduce it.
So it appears that by over-simplifying the fragment I removed the bug :) This works fine: <form id="action1" action="/"></form> <button form="action1" type="submit">Submit</button> But this triggers the error, even on http://validator.w3.org/nu/ tonight: <form id="action1" action="/"></form> <button form="action1" type="submit" role="button">Submit</button> Sorry for the bad report earlier :-(
It seems to be cause by the "role" attribute, specifically. Other attributes )e.g. data-whatever) don't trigger any error.
(In reply to comment #5) > So it appears that by over-simplifying the fragment I removed the bug :) > > This works fine: > > <form id="action1" action="/"></form> > <button form="action1" type="submit">Submit</button> > > But this triggers the error, even on http://validator.w3.org/nu/ tonight: > > <form id="action1" action="/"></form> > <button form="action1" type="submit" role="button">Submit</button> > > Sorry for the bad report earlier :-( No problem at all. Answer: Consider just removing the role attribute. I'm not sure why you've added it there, but if it's for the purpose of making your app accessible to users of AT software, I don't think it's necessary, because I think the AT already knows that the button element is a button, and the AT can let the user know that without you needing to put a role attribute on it. That is, at least for the simple case. But if you also have some other aria-* attributes on that element, then please let me know. Because I think that's a bit of a different case. Or if there's some other reason you're adding it (customer requirement or guidelines published somewhere or something), lemme know. So the background on this is that I know what's causing this problem and how to fix it but I'm not ready to make that fix yet. The role-checking behaving is in the part of the validator backend that does ARIA checking, and that part is currently incomplete. I have a patch I've been working on to make it more complete, but that patch is not finished yet: https://bitbucket.org/validator/syntax-patches/src/default/aria Also, the HTML5 spec currently does not clearly allow <button role=button...>. See the following bug: "Authors should not be allowed to specify roles on elements that they already have by default" https://www.w3.org/Bugs/Public/show_bug.cgi?id=11557 So I think what we are leaning toward is only allowing cases like <button role=button..> if there is also some other aria-* attribute(s) on the element; e.g., aria-pressed. So anyway, we are going to need an HTML5 spec change before I can do anything to make a validator change for this.
Fixed in the validator sources now. I'll push the change to the W3C validator later today.