[webkit-reviews] review granted: [Bug 32688] MSAA: Accessibility role of list items is wrong : [Attachment 45185] patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Dec 18 14:22:10 PST 2009


Adam Roben (aroben) <aroben at apple.com> has granted Jon Honeycutt
<jhoneycutt at apple.com>'s request for review:
Bug 32688: MSAA: Accessibility role of list items is wrong
https://bugs.webkit.org/show_bug.cgi?id=32688

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

------- Additional Comments from Adam Roben (aroben) <aroben at apple.com>

> +static AccessibilityRole msaaRoleForRenderer(const RenderObject* renderer)
> +{
> +    if (!renderer)
> +	   return UnknownRole;
> +
> +    if (renderer->isText())
> +	   return EditableTextRole;
> +
> +    if (renderer->isListItem())
> +	   return ListItemRole;
> +
> +    return UnknownRole;
> +}
> +
>  AccessibilityRole AccessibilityRenderObject::roleValueForMSAA() const
>  {
>      if (m_roleForMSAA != UnknownRole)
>	   return m_roleForMSAA;
>  
> -    if (m_renderer && m_renderer->isText())
> -	   m_roleForMSAA = EditableTextRole;
> -    else
> +    m_roleForMSAA = msaaRoleForRenderer(m_renderer);
> +
> +    if (m_roleForMSAA == UnknownRole)
>	   m_roleForMSAA = m_role;

It seems unfortunate that we have this m_roleForMSAA. I'd imagine the way
things would work to be:

* WebCore has a master AccessibilityRole enum that has all the members needed
by every supported accessibility platform
* The platform-specific integration with the system's accessibility layer would
translate AccessibilityRoles into whatever the platform expects

Is there a reason why we don't do this?

r=me


More information about the webkit-reviews mailing list