[webkit-reviews] review granted: [Bug 114547] AX: iOS: WAI-ARIA landmarks no longer speak type of landmark on iOS : [Attachment 199330] patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 24 10:16:31 PDT 2013


David Kilzer (:ddkilzer) <ddkilzer at webkit.org> has granted chris fleizach
<cfleizach at apple.com>'s request for review:
Bug 114547: AX: iOS: WAI-ARIA landmarks no longer speak type of landmark on iOS
https://bugs.webkit.org/show_bug.cgi?id=114547

Attachment 199330: patch 
https://bugs.webkit.org/attachment.cgi?id=199330&action=review

------- Additional Comments from David Kilzer (:ddkilzer) <ddkilzer at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=199330&action=review


r=me

> Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:1885
>	   switch (m_object->roleValue()) {
>	       default:
>		   return
NSAccessibilityRoleDescription(NSAccessibilityGroupRole, [self subrole]);

Is it normal to put the default: case at the beginning of the switch statement?


> Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:725
> +    if ([axDescription length]) {
> +	   if ([result length])
> +	       [result appendString:@", "];
> +	   [result appendString:axDescription];
> +    }

This code is essentially written 3 times in this patch.  It could be pulled
into a local static (inline) method to make this method a little more readable:


static void appendStringToResult(NSMutableString *result, NSString *string)
{
    ASSERT(result);
    if (![string length])
	return;
    if ([result length])
	[result appendString:@", "];
    [result appendString:string];
}

> Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:744
> +    return ([result length]) ? result : nil;

Nit:  Don't need the extra parenthesis here.


More information about the webkit-reviews mailing list