[Webkit-unassigned] [Bug 73819] [Gtk] Dojo toggle buttons should expose ROLE_TOGGLE_BUTTON not ROLE_PUSH_BUTTON

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 20 09:11:42 PDT 2012


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





--- Comment #27 from Alejandro PiƱeiro <apinheiro at igalia.com>  2012-08-20 09:12:14 PST ---
(In reply to comment #26)
> (From update of attachment 159393 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=159393&action=review
> 
> > Source/WebCore/accessibility/AccessibilityNodeObject.cpp:356
> >          role = PopUpButtonRole;
> 
> It looks like this logic is duplicated 3 times (and seems likely to grow)
> we should probably add a method (something like)
> 
> AccessibilityRole buttonRoleType() const;  
> 
> that will check ariaPressed() and ariaHasPopup()

Ok.


> > Source/WebCore/accessibility/AccessibilityObject.h:455
> > +    virtual bool hasARIAPressed() const { return false; }
> 
> I don't know which naming is better (ariaHas or hasARIA), but we should probably stick with the precedent here (so maybe use ariaHasPressedState())

I guess that that precedent is ariaHasPopup. I was tempted to use this nomemclature, but looking at the code the meaning of both methods are different:

bool AccessibilityRenderObject::ariaHasPopup() const
{
    return elementAttributeValue(aria_haspopupAttr);
}

ariasHasPopup is looking for the attribute has-popup [1], and returns its value. The method that I has just added checks if the object has or not (the value is irrelevant) the pressed state. So in one case this "has" is part of the name of the attribute and in the other case is not. 

But it is true that this "has" thing can be confusing. What about something like "ariaPressedAttrIsPresent" or just "ariaPressedIsPressent"?


> > Source/WebCore/accessibility/AccessibilityRenderObject.cpp:1689
> > +bool AccessibilityRenderObject::hasARIAPressed() const
> 
> this method should be in AccessibilityObject.cpp
> 
> > Source/WebCore/accessibility/AccessibilityRenderObject.cpp:3148
> > +        return ButtonRole;
> 
> another place to use that new method

Ok

[1] http://www.w3.org/TR/wai-aria/states_and_properties#aria-haspopup

-- 
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