Skip to content
  • cfleizach@apple.com's avatar
    AX: Items the img aria role aren't inserting an object replacement character · cf53c180
    cfleizach@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=118259
    
    Source/WebCore: 
    
    Reviewed by Tim Horton.
    
    VoiceOver relies on object replacement characters being emitted when asking for selected text.
    This has worked if a real <img> is used, but if role="img" is used on a <div>, for example,
    no emission is performed, which leads to missed elements in text.
    
    Test: platform/mac/accessibility/aria-image-emits-object-replacement.html
    
    * editing/TextIterator.cpp:
    (WebCore::isRendererReplacedElement):
    (WebCore::TextIterator::advance):
    
    LayoutTests: 
    
    Reviewed by Reviewed by Tim Horton.
    
    * accessibility/non-native-image-crash-expected.txt:
    * platform/mac/accessibility/aria-image-emits-object-replacement-expected.txt: Added.
    * platform/mac/accessibility/aria-image-emits-object-replacement.html: Added.
    * platform/mac/accessibility/img-fallsback-to-title-expected.txt:
         Update expected tests where role="img" now emits replacement character.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@152388 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    cf53c180