[Webkit-unassigned] [Bug 32658] New: Make it easier for plug-ins to participate in the Accessibility hierarchy
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Dec 17 06:18:22 PST 2009
https://bugs.webkit.org/show_bug.cgi?id=32658
Summary: Make it easier for plug-ins to participate in the
Accessibility hierarchy
Product: WebKit
Version: 528+ (Nightly build)
Platform: Macintosh
OS/Version: Mac OS X 10.6
Status: UNCONFIRMED
Severity: Enhancement
Priority: P2
Component: Plug-ins
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: ssp-web at earthlingsoft.net
A plug-in should participate in the accessibility hierarchy.
To do that it needs to supply an AXParent element to
-accessibilityAttributeValue:.
Finding the correct element for that seems unnecessarily hard as the NSView
subclassed by the plug-in seems to be contained in another element in the
accessibility hierarchy which is not easily accessed:
Accessibility Inspector shows:
<AXApplication: "Safari">
<AXWindow: "YouTube - Hampe Recycling Werbung (Kino)">
<AXGroup>
<AXScrollArea>
<AXWebArea: "HTML-Inhalt">
<AXGroup: "Blocked Flash content"> ← mystery element I have to
reference
<AXGroup: "Blocked Flash content"> ← plug-in's element
I should return the 'mystery' AXGroup as the plug-in's AXParent element to keep
the accessibility hierarchy intact, but it doesn't seem to be returned by any
convenient method.
Instead I had to resort to looping through all elements on the page and some
speculation, giving code like this to find the desired object:
id value = nil;
id webArea = [[[self superview]
accessibilityAttributeValue:NSAccessibilityChildrenAttribute] objectAtIndex:0];
NSArray * webAreaChildren = [webArea
accessibilityAttributeValue:NSAccessibilityChildrenAttribute];
CTFForEachObject( NSObject , child, webAreaChildren ) { // looping macro
NSArray * subChildren = [child
accessibilityAttributeValue:NSAccessibilityChildrenAttribute];
if ([subChildren count] == 1) {
id firstSubChild = [[child
accessibilityAttributeValue:NSAccessibilityChildrenAttribute] objectAtIndex:0];
if ( firstSubChild == self ) {
value = child;
break;
}
}
}
return value;
This seems all of non-obvious, non-elegant and not particularly efficient to
me. Perhaps WebKit could assist plug-ins a bit more in being good accessibility
citizens and provide a method returning the relevant object.
--
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