AX: implement CSS3 Speech "speak"
authorcfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Sep 2010 19:59:56 +0000 (19:59 +0000)
committercfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Sep 2010 19:59:56 +0000 (19:59 +0000)
https://bugs.webkit.org/show_bug.cgi?id=46827

Reviewed by Darin Adler.

WebCore:

Support the "speak" style as defined in
http://www.w3.org/TR/css3-speech/#speak

This puts all the pieces in place for a platform to support this ability, but there's no platform implementation yet.

Test: platform/mac/accessibility/css-speech-speak.html

* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::speakProperty):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::speakProperty):
* accessibility/AccessibilityRenderObject.h:
* accessibility/mac/AccessibilityObjectWrapper.mm:
(-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator ESpeak):
* css/CSSPropertyNames.in:
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
* css/CSSValueKeywords.in:
* rendering/style/RenderStyle.h:
(WebCore::InheritedFlags::speak):
(WebCore::InheritedFlags::setSpeak):
(WebCore::InheritedFlags::initialSpeak):
* rendering/style/RenderStyleConstants.h:
* rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator==):
* rendering/style/StyleRareInheritedData.h:

WebKitTools:

* DumpRenderTree/AccessibilityUIElement.cpp:
(speakCallback):
(AccessibilityUIElement::speak):
(AccessibilityUIElement::getJSClass):
* DumpRenderTree/AccessibilityUIElement.h:
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::speak):

LayoutTests:

* platform/mac/accessibility/css-speech-speak-expected.txt: Added.
* platform/mac/accessibility/css-speech-speak.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@68680 268f45cc-cd09-0410-ab3c-d52691b4dbfc

21 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/mac/accessibility/css-speech-speak-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/accessibility/css-speech-speak.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/accessibility/AccessibilityObject.h
WebCore/accessibility/AccessibilityRenderObject.cpp
WebCore/accessibility/AccessibilityRenderObject.h
WebCore/accessibility/mac/AccessibilityObjectWrapper.mm
WebCore/css/CSSComputedStyleDeclaration.cpp
WebCore/css/CSSPrimitiveValueMappings.h
WebCore/css/CSSPropertyNames.in
WebCore/css/CSSStyleSelector.cpp
WebCore/css/CSSValueKeywords.in
WebCore/rendering/style/RenderStyle.h
WebCore/rendering/style/RenderStyleConstants.h
WebCore/rendering/style/StyleRareInheritedData.cpp
WebCore/rendering/style/StyleRareInheritedData.h
WebKitTools/ChangeLog
WebKitTools/DumpRenderTree/AccessibilityUIElement.cpp
WebKitTools/DumpRenderTree/AccessibilityUIElement.h
WebKitTools/DumpRenderTree/mac/AccessibilityUIElementMac.mm

index 03fc736..6fbdea7 100644 (file)
@@ -1,3 +1,13 @@
+2010-09-29  Chris Fleizach  <cfleizach@apple.com>
+
+        Reviewed by Darin Adler.
+
+        AX: implement CSS3 Speech "speak"
+        https://bugs.webkit.org/show_bug.cgi?id=46827
+
+        * platform/mac/accessibility/css-speech-speak-expected.txt: Added.
+        * platform/mac/accessibility/css-speech-speak.html: Added.
+
 2010-09-29  David Hyatt  <hyatt@apple.com>
 
         Reviewed by Sam Weinig.
diff --git a/LayoutTests/platform/mac/accessibility/css-speech-speak-expected.txt b/LayoutTests/platform/mac/accessibility/css-speech-speak-expected.txt
new file mode 100644 (file)
index 0000000..943a652
--- /dev/null
@@ -0,0 +1,25 @@
+Initial
+No speech
+Normal
+Spellout
+Digits
+Literal
+No punctuation
+test
+This tests that using the CSS3-speech property 'speak' works as from a WebCore level (not a platform level, that is up to the platforms)
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS accessibilityController.focusedElement.childAtIndex(0).speak is 'normal'
+PASS accessibilityController.focusedElement.childAtIndex(0).speak is 'none'
+PASS accessibilityController.focusedElement.childAtIndex(0).speak is 'normal'
+PASS accessibilityController.focusedElement.childAtIndex(0).speak is 'spell-out'
+PASS accessibilityController.focusedElement.childAtIndex(0).speak is 'digits'
+PASS accessibilityController.focusedElement.childAtIndex(0).speak is 'literal-punctuation'
+PASS accessibilityController.focusedElement.childAtIndex(0).speak is 'no-punctuation'
+PASS accessibilityController.focusedElement.childAtIndex(0).speak is 'digits'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/platform/mac/accessibility/css-speech-speak.html b/LayoutTests/platform/mac/accessibility/css-speech-speak.html
new file mode 100644 (file)
index 0000000..1b7507a
--- /dev/null
@@ -0,0 +1,76 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../../fast/js/resources/js-test-style.css">
+<script>
+var successfullyParsed = false;
+</script>
+<script src="../../../fast/js/resources/js-test-pre.js"></script>
+<style>
+div.speech-none { speak: none; }
+div.speech-normal { speak: normal; }
+div.speech-spellout { speak: spell-out; }
+div.speech-digits { speak: digits; }
+div.speech-literalpunc { speak: literal-punctuation; }
+div.speech-nopunc { speak: no-punctuation; }
+</style>
+</head>
+<body id="body">
+
+
+<div tabindex="0" id="initial" >Initial</div>
+<div tabindex="0" id="speech-none" class="speech-none">No speech</div>
+<div tabindex="0" id="speech-normal" class="speech-normal">Normal</div>
+<div tabindex="0" id="speech-spellout" class="speech-spellout">Spellout</div>
+<div tabindex="0" id="speech-digits" class="speech-digits">Digits</div>
+<div tabindex="0" id="speech-literalpunc" class="speech-literalpunc">Literal</div>
+<div tabindex="0" id="speech-nopunc" class="speech-nopunc">No punctuation</div>
+
+<div style='speak: digits;'>
+ <div>
+  <div>
+    <a id="testlink" tabindex="0" href="#">test</a>
+  </div>
+ </div>
+</div>
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+
+    description("This tests that using the CSS3-speech property 'speak' works as from a WebCore level (not a platform level, that is up to the platforms)");
+
+    if (window.accessibilityController) {
+
+          document.getElementById("initial").focus();
+          shouldBe("accessibilityController.focusedElement.childAtIndex(0).speak", "'normal'");
+
+          document.getElementById("speech-none").focus();
+          shouldBe("accessibilityController.focusedElement.childAtIndex(0).speak", "'none'");
+
+          document.getElementById("speech-normal").focus();
+          shouldBe("accessibilityController.focusedElement.childAtIndex(0).speak", "'normal'");
+
+          document.getElementById("speech-spellout").focus();
+          shouldBe("accessibilityController.focusedElement.childAtIndex(0).speak", "'spell-out'");
+
+          document.getElementById("speech-digits").focus();
+          shouldBe("accessibilityController.focusedElement.childAtIndex(0).speak", "'digits'");
+
+          document.getElementById("speech-literalpunc").focus();
+          shouldBe("accessibilityController.focusedElement.childAtIndex(0).speak", "'literal-punctuation'");
+
+          document.getElementById("speech-nopunc").focus();
+          shouldBe("accessibilityController.focusedElement.childAtIndex(0).speak", "'no-punctuation'");
+
+          document.getElementById("testlink").focus();
+          shouldBe("accessibilityController.focusedElement.childAtIndex(0).speak", "'digits'");
+    }
+
+    successfullyParsed = true;
+</script>
+
+<script src="../../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
index f64a77d..be84cd4 100644 (file)
@@ -1,3 +1,43 @@
+2010-09-29  Chris Fleizach  <cfleizach@apple.com>
+
+        Reviewed by Darin Adler.
+
+        AX: implement CSS3 Speech "speak"
+        https://bugs.webkit.org/show_bug.cgi?id=46827
+
+        Support the "speak" style as defined in
+        http://www.w3.org/TR/css3-speech/#speak
+
+        This puts all the pieces in place for a platform to support this ability, but there's no platform implementation yet.
+
+        Test: platform/mac/accessibility/css-speech-speak.html
+
+        * accessibility/AccessibilityObject.h:
+        (WebCore::AccessibilityObject::speakProperty):
+        * accessibility/AccessibilityRenderObject.cpp:
+        (WebCore::AccessibilityRenderObject::speakProperty):
+        * accessibility/AccessibilityRenderObject.h:
+        * accessibility/mac/AccessibilityObjectWrapper.mm:
+        (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
+        * css/CSSPrimitiveValueMappings.h:
+        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
+        (WebCore::CSSPrimitiveValue::operator ESpeak):
+        * css/CSSPropertyNames.in:
+        * css/CSSStyleSelector.cpp:
+        (WebCore::CSSStyleSelector::applyProperty):
+        * css/CSSValueKeywords.in:
+        * rendering/style/RenderStyle.h:
+        (WebCore::InheritedFlags::speak):
+        (WebCore::InheritedFlags::setSpeak):
+        (WebCore::InheritedFlags::initialSpeak):
+        * rendering/style/RenderStyleConstants.h:
+        * rendering/style/StyleRareInheritedData.cpp:
+        (WebCore::StyleRareInheritedData::StyleRareInheritedData):
+        (WebCore::StyleRareInheritedData::operator==):
+        * rendering/style/StyleRareInheritedData.h:
+
 2010-09-29  João Paulo Rechi Vita  <jprvita@profusion.mobi>
 
         Reviewed by Antonio Gomes.
index e8f6d1b..bcf09d2 100644 (file)
@@ -536,6 +536,9 @@ public:
     
     bool supportsARIAAttributes() const;
     
+    // CSS3 Speech properties.
+    virtual ESpeak speakProperty() const { return SpeakNormal; }
+    
 #if HAVE(ACCESSIBILITY)
 #if PLATFORM(GTK)
     AccessibilityObjectWrapper* wrapper() const;
index 5ca78ca..d6bec4f 100644 (file)
@@ -1487,6 +1487,14 @@ AccessibilityObject* AccessibilityRenderObject::internalLinkElement() const
     return firstAccessibleObjectFromNode(linkedNode);
 }
 
+ESpeak AccessibilityRenderObject::speakProperty() const
+{
+    if (!m_renderer)
+        return AccessibilityObject::speakProperty();
+    
+    return m_renderer->style()->speak();
+}
+    
 void AccessibilityRenderObject::addRadioButtonGroupMembers(AccessibilityChildrenVector& linkedUIElements) const
 {
     if (!m_renderer || roleValue() != RadioButtonRole)
index b7b85fe..c62e98d 100644 (file)
@@ -301,6 +301,8 @@ private:
     String accessibilityDescriptionForElements(Vector<Element*> &elements) const;
     void elementsFromAttribute(Vector<Element*>& elements, const QualifiedName& name) const;
     
+    virtual ESpeak speakProperty() const;
+    
     virtual const AtomicString& ariaLiveRegionStatus() const;
     virtual const AtomicString& ariaLiveRegionRelevant() const;
     virtual bool ariaLiveRegionAtomic() const;
index cb983eb..e4b7d8e 100644 (file)
@@ -1908,6 +1908,26 @@ static NSString* roleValueToNSString(AccessibilityRole value)
     if ([attributeName isEqualToString:@"AXClickPoint"])
         return [NSValue valueWithPoint:m_object->clickPoint()];
     
+    // This is used by DRT to verify CSS3 speech works.
+    if ([attributeName isEqualToString:@"AXDRTSpeechAttribute"]) {
+        ESpeak speakProperty = m_object->speakProperty();
+        switch (speakProperty) {
+        case SpeakNone:
+            return @"none";
+        case SpeakSpellOut:
+            return @"spell-out";
+        case SpeakDigits:
+            return @"digits";
+        case SpeakLiteralPunctuation:
+            return @"literal-punctuation";
+        case SpeakNoPunctuation:
+            return @"no-punctuation";
+        default:
+        case SpeakNormal:
+            return @"normal";
+        }
+    }
+    
     return nil;
 }
 
index 1cc7996..e50e190 100644 (file)
@@ -123,6 +123,7 @@ static const int computedProperties[] = {
     CSSPropertyPosition,
     CSSPropertyResize,
     CSSPropertyRight,
+    CSSPropertySpeak,
     CSSPropertyTableLayout,
     CSSPropertyTextAlign,
     CSSPropertyTextDecoration,
@@ -1409,6 +1410,8 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper
             rect->setLeft(zoomAdjustedPixelValue(style->clip().left().value(), style.get()));
             return CSSPrimitiveValue::create(rect.release());
         }
+        case CSSPropertySpeak:
+            return CSSPrimitiveValue::create(style->speak());
         case CSSPropertyWebkitTransform:
             return computedTransform(renderer, style.get());
         case CSSPropertyWebkitTransformOrigin: {
index 14afdf6..8369155 100644 (file)
@@ -2730,6 +2730,53 @@ template<> inline CSSPrimitiveValue::operator EVectorEffect() const
     }
 }
 
+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ESpeak e)
+    : m_type(CSS_IDENT)
+    , m_hasCachedCSSText(false)
+{
+    switch (e) {
+    case SpeakNone:
+        m_value.ident = CSSValueNone;
+        break;
+    case SpeakNormal:
+        m_value.ident = CSSValueNormal;
+        break;
+    case SpeakSpellOut:
+        m_value.ident = CSSValueSpellOut;
+        break;
+    case SpeakDigits:
+        m_value.ident = CSSValueDigits;
+        break;
+    case SpeakLiteralPunctuation:
+        m_value.ident = CSSValueLiteralPunctuation;
+        break;
+    case SpeakNoPunctuation:
+        m_value.ident = CSSValueNoPunctuation;
+        break;
+    }
+}
+    
+template<> inline CSSPrimitiveValue::operator ESpeak() const
+{
+    switch (m_value.ident) {
+    case CSSValueNone:
+        return SpeakNone;
+    case CSSValueNormal:
+        return SpeakNormal;
+    case CSSValueSpellOut:
+        return SpeakSpellOut;
+    case CSSValueDigits:
+        return SpeakDigits;
+    case CSSValueLiteralPunctuation:
+        return SpeakLiteralPunctuation;
+    case CSSValueNoPunctuation:
+        return SpeakNoPunctuation;
+    default:
+        ASSERT_NOT_REACHED();
+        return SpeakNormal;
+    }
+}
+    
 #endif
 
 }
index 8584e5f..dba0069 100644 (file)
@@ -123,6 +123,7 @@ resize
 right
 size
 src
+speak
 table-layout
 text-align
 text-decoration
index ae9d912..eafa250 100644 (file)
@@ -5483,6 +5483,12 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
     case CSSPropertySize:
         applyPageSizeProperty(value);
         return;
+    
+    case CSSPropertySpeak:
+        HANDLE_INHERIT_AND_INITIAL(speak, Speak);
+        m_style->setSpeak(*primitiveValue);
+        return;
+            
     case CSSPropertyInvalid:
         return;
 
index 556d0bc..b8d01b8 100644 (file)
@@ -714,6 +714,14 @@ stroke
 #none
 
 #
+# CSS_PROP_SPEECH
+#
+spell-out
+digits
+literal-punctuation
+no-punctuation
+
+#
 # -webkit-font-smoothing
 #
 # auto
index 480fdb6..920d485 100644 (file)
@@ -745,6 +745,8 @@ public:
     EBlockFlowDirection blockFlow() const { return static_cast<EBlockFlowDirection>(inherited_flags._blockFlow); }
     bool isVerticalBlockFlow() const { return blockFlow() == TopToBottomBlockFlow || blockFlow() == BottomToTopBlockFlow; }
 
+    ESpeak speak() { return static_cast<ESpeak>(rareInheritedData->speak); }
+        
 // attribute setter methods
 
     void setDisplay(EDisplay v) { noninherited_flags._effectiveDisplay = v; }
@@ -1037,6 +1039,7 @@ public:
     void setTransformOriginX(Length l) { SET_VAR(rareNonInheritedData.access()->m_transform, m_x, l); }
     void setTransformOriginY(Length l) { SET_VAR(rareNonInheritedData.access()->m_transform, m_y, l); }
     void setTransformOriginZ(float f) { SET_VAR(rareNonInheritedData.access()->m_transform, m_z, f); }
+    void setSpeak(ESpeak s) { SET_VAR(rareInheritedData, speak, s); }
     // End CSS3 Setters
 
     // Apple-specific property setters
@@ -1226,6 +1229,7 @@ public:
     static EKHTMLLineBreak initialKHTMLLineBreak() { return LBNORMAL; }
     static EMatchNearestMailBlockquoteColor initialMatchNearestMailBlockquoteColor() { return BCNORMAL; }
     static const AtomicString& initialHighlight() { return nullAtom; }
+    static ESpeak initialSpeak() { return SpeakNormal; }
     static Hyphens initialHyphens() { return HyphensManual; }
     static const AtomicString& initialHyphenationString() { return nullAtom; }
     static const AtomicString& initialHyphenationLocale() { return nullAtom; }
index 94d30d5..d751aa8 100644 (file)
@@ -415,6 +415,8 @@ enum ELineClampType { LineClampLineCount, LineClampPercentage };
 
 enum Hyphens { HyphensNone, HyphensManual, HyphensAuto };
 
+enum ESpeak { SpeakNone, SpeakNormal, SpeakSpellOut, SpeakDigits, SpeakLiteralPunctuation, SpeakNoPunctuation };
+    
 } // namespace WebCore
 
 #endif // RenderStyleConstants_h
index 71e5252..326c4ee 100644 (file)
@@ -44,6 +44,7 @@ StyleRareInheritedData::StyleRareInheritedData()
     , resize(RenderStyle::initialResize())
     , userSelect(RenderStyle::initialUserSelect())
     , colorSpace(DeviceColorSpace)
+    , speak(SpeakNormal)
     , hyphens(HyphensManual)
 {
 }
@@ -70,6 +71,7 @@ StyleRareInheritedData::StyleRareInheritedData(const StyleRareInheritedData& o)
     , resize(o.resize)
     , userSelect(o.userSelect)
     , colorSpace(o.colorSpace)
+    , speak(o.speak)
     , hyphens(o.hyphens)
     , hyphenationString(o.hyphenationString)
     , hyphenationLocale(o.hyphenationLocale)
@@ -112,6 +114,7 @@ bool StyleRareInheritedData::operator==(const StyleRareInheritedData& o) const
         && resize == o.resize
         && userSelect == o.userSelect
         && colorSpace == o.colorSpace
+        && speak == o.speak
         && hyphens == o.hyphens
         && hyphenationString == o.hyphenationString
         && hyphenationLocale == o.hyphenationLocale;
index 6d2e55d..3a78976 100644 (file)
@@ -77,6 +77,7 @@ public:
     unsigned resize : 2; // EResize
     unsigned userSelect : 1;  // EUserSelect
     unsigned colorSpace : 1; // ColorSpace
+    unsigned speak : 3; // ESpeak
     unsigned hyphens : 2; // Hyphens
 
     AtomicString hyphenationString;
index fc0850e..fb6dc73 100644 (file)
@@ -1,3 +1,18 @@
+2010-09-29  Chris Fleizach  <cfleizach@apple.com>
+
+        Reviewed by Darin Adler.
+
+        AX: implement CSS3 Speech "speak"
+        https://bugs.webkit.org/show_bug.cgi?id=46827
+
+        * DumpRenderTree/AccessibilityUIElement.cpp:
+        (speakCallback):
+        (AccessibilityUIElement::speak):
+        (AccessibilityUIElement::getJSClass):
+        * DumpRenderTree/AccessibilityUIElement.h:
+        * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
+        (AccessibilityUIElement::speak):
+
 2010-09-29  Mihai Parparita  <mihaip@chromium.org>
 
         Reviewed by Adam Barth.
index 13c642a..31488e5 100644 (file)
@@ -679,6 +679,12 @@ static JSValueRef isIgnoredCallback(JSContextRef context, JSObjectRef thisObject
     return JSValueMakeBoolean(context, toAXElement(thisObject)->isIgnored());
 }
 
+static JSValueRef speakCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef, JSValueRef*)
+{
+    JSRetainPtr<JSStringRef> speakString(Adopt, toAXElement(thisObject)->speak());
+    return JSValueMakeString(context, speakString.get());
+}
+
 static JSValueRef getHasPopupCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef, JSValueRef*)
 {
     return JSValueMakeBoolean(context, toAXElement(thisObject)->hasPopup());
@@ -737,6 +743,11 @@ static JSValueRef removeNotificationListenerCallback(JSContextRef context, JSObj
 
 // Implementation
 
+// Unsupported methods on various platforms.
+#if !PLATFORM(MAC)
+JSStringRef AccessibilityUIElement::speak() { return 0; }
+#endif
+
 #if !SUPPORTS_AX_TEXTMARKERS
 
 AccessibilityTextMarkerRange AccessibilityUIElement::textMarkerRangeForElement(AccessibilityUIElement*)
@@ -837,6 +848,7 @@ JSClassRef AccessibilityUIElement::getJSClass()
         { "ariaIsGrabbed", getARIAIsGrabbedCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "ariaDropEffects", getARIADropEffectsCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "isIgnored", isIgnoredCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+        { "speak", speakCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { 0, 0, 0, 0 }
     };
 
index 5170f20..aec6d61 100644 (file)
@@ -147,6 +147,9 @@ public:
     JSStringRef documentURI();
     JSStringRef url();
 
+    // CSS3-speech properties.
+    JSStringRef speak();
+    
     // Table-specific attributes
     JSStringRef attributesOfColumnHeaders();
     JSStringRef attributesOfRowHeaders();
index 5f9705a..13c9fa1 100644 (file)
@@ -780,6 +780,17 @@ int AccessibilityUIElement::hierarchicalLevel() const
     return 0;
 }
 
+JSStringRef AccessibilityUIElement::speak()
+{
+    BEGIN_AX_OBJC_EXCEPTIONS
+    id value = [m_element accessibilityAttributeValue:@"AXDRTSpeechAttribute"];
+    if ([value isKindOfClass:[NSString class]])
+        return [value createJSStringRef];
+    END_AX_OBJC_EXCEPTIONS
+        
+    return 0;
+}
+
 bool AccessibilityUIElement::ariaIsGrabbed() const
 {
     BEGIN_AX_OBJC_EXCEPTIONS