[Bug 22846] Wrong error messages when role attribute is used in <input>

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |faulkner.steve@gmail.com,
                   |                            |mike@w3.org

--- Comment #1 from Michael[tm] Smith <mike@w3.org> ---
Cc'ing Steve Faulkner to get his feedback.

Steve, is <input role=textbox> meant to be valid? From the W3C HTML spec, it's
still unclear to me whether elements with strong native semantics are allowed
to have role attributes that match their "implicit WAI-ARIA semantics". The
WHATWG spec still explicitly disallows that -

  "Authors must not set the ARIA role and aria-* attributes to values that
match the default implicit ARIA semantics defined in the following two tables."
 
http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html#wai-aria

...and while the W3C HTML spec doesn't explicitly disallow it, it seems to me
it's still not clear what it does allow ^

 
http://www.w3.org/html/wg/drafts/html/master/dom.html#sec-strong-native-semantics

For example, is <input role=dialog> meant to valid? Or <input role=link>? etc.

(In reply to comment #0)
> Example:
> 
> <!doctype html><title>Demo</title>
> <input role=textbox>

Question: Why are you marking up that way? As far as I understand it, that's
not useful for accessibility purposes, because UAs already expose <input>
without a type attribute to AT as a textbox.

> Causes the error message “Element input is missing one or more of the
> following attributes: type.”, even though the type attribute has always been
> optional on <input>.

Yeah, I agree that's not a helpful error message in this case.

> Adding the attribute type=text causes a different error message “Attribute
> role not allowed on element input at this point”, even though the role
> attribute is global (allowed on all elements) in HTML5.

But in some cases the spec additionally gives specific constraints on where
role can be used, based on its value:

 
http://www.w3.org/html/wg/drafts/html/master/dom.html#sec-implicit-aria-semantics

So, far example, <input type=checkbox role=button> is explicitly disallowed by
the HTML spec.

Yeah, it does not explicitly disallow <input type=text role=textbox> but then
it (the W3C version at least) doesn't clearly and explicitly disallow <input
type=text role=dialog> or <input type=text role=dialog> either, as far as I can
see.

> This bug somewhat resembles bug 15910 (which is RESOLVED FIXED, and
> appropriately so: that bug is not present now – but it too relates to the
> role attribute and might reflect a similar underlying problem).

Right. See my comment there:

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

[[
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. 
]]

But actually, we (Steve and I) never got around to discussing that further and
now spec change has been made yet to address it.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Sunday, 4 August 2013 11:44:47 UTC