[Bug 15910] Broken check for type attribute on button element

https://www.w3.org/Bugs/Public/show_bug.cgi?id=15910

Michael[tm] Smith <mike@w3.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |11557

--- Comment #7 from Michael[tm] Smith <mike@w3.org> 2012-02-09 03:11:25 UTC ---
(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.

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Thursday, 9 February 2012 03:11:36 UTC