[Webkit-unassigned] [Bug 122015] [ATK] Expose aria-invalid as a text attribute (not object attribute)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 1 09:45:07 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=122015





--- Comment #11 from Mario Sanchez Prada <mario at webkit.org>  2013-10-01 09:44:02 PST ---
(In reply to comment #10)
> (From update of attachment 212986 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=212986&action=review
> 
> > Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceText.cpp:308
> > +        String invalidValue = invalidStatus == "spelling" || invalidStatus == "grammar" ? invalidStatus : "true";
> 
> I feel like this logic might be better served if it's in WebCore. the
> platforms shouldn't have to worry about this level of ARIA detail.
> 
> I think we should have a new method, isInvalid() that takes care of this
> logic (since it appears that GTK doesn't want the actual string like Mac does)

Hmm.. actually we want the actual string, but only if it's "true", "grammar" or "spelling". Any other non-empty value that might have been set in the aria-invalid attribute should be returned as "false".

However, that's not what AccessibilityObject::invalidStatus() does:

  const AtomicString& AccessibilityObject::invalidStatus() const
  {
      DEFINE_STATIC_LOCAL(const AtomicString, invalidStatusFalse, ("false", AtomicString::ConstructFromLiteral));

      // aria-invalid can return false (default), grammer, spelling, or true.
      const AtomicString& ariaInvalid = getAttribute(aria_invalidAttr);

      // If empty or not present, it should return false.
      if (ariaInvalid.isEmpty())
          return invalidStatusFalse;

      return ariaInvalid;
  }


... but I'm thinking now that this is actually a bug in there, since the W3C spec is quite clear about that:

 "Any value not recognized in the list of allowed values MUST be treated by user agents as if the value true had been provided"

Thus, I think I will update the patch moving that logic from the ATK wrapper into AccessibilityObject::invalidStatus(). The aria-invalid test should keep passing fine for the Mac as it is, although I will probably add a new element with a not specified value to make sure we return "true" in that case as well.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list