Changeset 50004 in webkit


Ignore:
Timestamp:
Oct 23, 2009 3:16:33 PM (14 years ago)
Author:
jhoneycutt@apple.com
Message:

MSAA: Name for image elements should use alt attribute text

https://bugs.webkit.org/show_bug.cgi?id=30727
<rdar://problem/7328291>

Reviewed by Alice Liu.

WebKit/win:

  • AccessibleBase.cpp:

(AccessibleBase::createInstance):
If the AccessibilityObject is an image, return an AccessibleImage.

  • AccessibleImage.cpp: Added.

(AccessibleImage::AccessibleImage):
Call the base constructor.
(AccessibleImage::name):
If the object is not an AccessibilityRenderObject, return the base's
name(). Look first for an ARIA "labeled-by" attribute, then look for an
alternate text attribute. Fall back to the base's name().

  • AccessibleImage.h: Added.

(AccessibleImage::~AccessibleImage):

  • WebKit.vcproj/WebKit.vcproj:

Add AccessibleImage to the project.

LayoutTests:

  • platform/win/accessibility/img-alt-attribute-expected.txt: Added.
  • platform/win/accessibility/img-alt-attribute.html: Added.
Location:
trunk
Files:
4 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r49998 r50004  
     12009-10-23  Jon Honeycutt  <jhoneycutt@apple.com>
     2
     3        MSAA: Name for image elements should use alt attribute text
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=30727
     6        <rdar://problem/7328291>
     7
     8        Reviewed by Alice Liu.
     9
     10        * platform/win/accessibility/img-alt-attribute-expected.txt: Added.
     11        * platform/win/accessibility/img-alt-attribute.html: Added.
     12
    1132009-10-23  Sam Weinig  <sam@webkit.org>
    214
  • trunk/WebKit/win/AccessibleBase.cpp

    r48511 r50004  
    2828#include "AccessibleBase.h"
    2929
    30 #include <oleacc.h>
     30#include "AccessibleImage.h"
     31#include "WebView.h"
    3132#include <WebCore/AccessibilityObject.h>
    3233#include <WebCore/AXObjectCache.h>
     
    4445#include <WebCore/RenderObject.h>
    4546#include <WebCore/RenderView.h>
    46 #include "WebView.h"
     47#include <oleacc.h>
    4748#include <wtf/RefPtr.h>
    4849
     
    6869{
    6970    ASSERT_ARG(obj, obj);
     71
     72    if (obj->isImage())
     73        return new AccessibleImage(obj);
    7074
    7175    return new AccessibleBase(obj);
  • trunk/WebKit/win/ChangeLog

    r49999 r50004  
     12009-10-23  Jon Honeycutt  <jhoneycutt@apple.com>
     2
     3        MSAA: Name for image elements should use alt attribute text
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=30727
     6        <rdar://problem/7328291>
     7
     8        Reviewed by Alice Liu.
     9
     10        * AccessibleBase.cpp:
     11        (AccessibleBase::createInstance):
     12        If the AccessibilityObject is an image, return an AccessibleImage.
     13
     14        * AccessibleImage.cpp: Added.
     15        (AccessibleImage::AccessibleImage):
     16        Call the base constructor.
     17        (AccessibleImage::name):
     18        If the object is not an AccessibilityRenderObject, return the base's
     19        name(). Look first for an ARIA "labeled-by" attribute, then look for an
     20        alternate text attribute. Fall back to the base's name().
     21
     22        * AccessibleImage.h: Added.
     23        (AccessibleImage::~AccessibleImage):
     24
     25        * WebKit.vcproj/WebKit.vcproj:
     26        Add AccessibleImage to the project.
     27
    1282009-10-23  Sam Weinig  <sam@webkit.org>
    229
  • trunk/WebKit/win/WebKit.vcproj/WebKit.vcproj

    r49705 r50004  
    527527                        </File>
    528528                        <File
     529                                RelativePath="..\AccessibleImage.h"
     530                                >
     531                        </File>
     532                        <File
    529533                                RelativePath=".\autoversion.h"
    530534                                >
     
    840844                        <File
    841845                                RelativePath="..\AccessibleDocument.cpp"
     846                                >
     847                        </File>
     848                        <File
     849                                RelativePath="..\AccessibleImage.cpp"
    842850                                >
    843851                        </File>
Note: See TracChangeset for help on using the changeset viewer.