⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 185675 in webkit


Ignore:
Timestamp:
Jun 17, 2015, 4:20:27 PM (11 years ago)
Author:
Chris Fleizach
Message:

AX: VoiceOver in iOS not announcing generic WAI-ARIA region, even if labelled properly
​https://bugs.webkit.org/show_bug.cgi?id=146066

Reviewed by Darin Adler.

Source/WebCore:

Allow the region role to identify as a landmark type.

Updated test: platform/ios-simulator/accessibility/landmark-types.html

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityObjectWrapper _accessibilityIsLandmarkRole:]):

LayoutTests:

  • platform/ios-simulator/accessibility/landmark-type-expected.txt:
  • platform/ios-simulator/accessibility/landmark-type.html:
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r185666 r185675  
     12015-06-17  Chris Fleizach  <cfleizach@apple.com>
     2
     3        AX: VoiceOver in iOS not announcing generic WAI-ARIA region, even if labelled properly
     4        https://bugs.webkit.org/show_bug.cgi?id=146066
     5
     6        Reviewed by Darin Adler.
     7
     8        * platform/ios-simulator/accessibility/landmark-type-expected.txt:
     9        * platform/ios-simulator/accessibility/landmark-type.html:
     10
    1112015-06-17  Simon Fraser  <simon.fraser@apple.com>
    212
  • trunk/LayoutTests/platform/ios-simulator/accessibility/landmark-type-expected.txt

    r185609 r185675  
     1non landmark
     2text
    13text
    24text
    … …  
    79
    810PASS main.description is 'AXLabel: main'
     11PASS main.childAtIndex(0).traits != nonLandmarkText.traits is true
    912PASS banner.description is 'AXLabel: banner'
     13PASS banner.childAtIndex(0).traits != nonLandmarkText.traits is true
     14PASS region.description is 'AXLabel: testregion, region'
     15PASS region.childAtIndex(0).traits != nonLandmarkText.traits is true
     16PASS region.childAtIndex(0).traits == main.childAtIndex(0).traits is true
    1017PASS successfullyParsed is true
    1118
  • trunk/LayoutTests/platform/ios-simulator/accessibility/landmark-type.html

    r185609 r185675  
    99<body id="body">
    1010
     11<div role="group" id="group">
     12non landmark
     13</div>
     14
    1115<div role="main" id="main">
    1216text
    … …  
    1418
    1519<div role="banner" id="banner">
     20text
     21</div>
     22
     23<div role="region" id="region" aria-label="testregion">
    1624text
    1725</div>
    … …  
    2634    if (window.accessibilityController) {
    2735
     36        // The traits of an object inside a landmark will be different from those not in a landmark,
     37        // so we can use that to determine if an object is marked as a landmark.
     38        var nonLandmarkText = accessibilityController.accessibleElementById("group").childAtIndex(0);
     39
    2840        var main = accessibilityController.accessibleElementById("main");
    2941        shouldBe("main.description", "'AXLabel: main'");
     42        shouldBeTrue("main.childAtIndex(0).traits != nonLandmarkText.traits");
    3043
    3144        var banner = accessibilityController.accessibleElementById("banner");
    3245        shouldBe("banner.description", "'AXLabel: banner'");
     46        shouldBeTrue("banner.childAtIndex(0).traits != nonLandmarkText.traits");
     47
     48        var region = accessibilityController.accessibleElementById("region");
     49        shouldBe("region.description", "'AXLabel: testregion, region'");
     50        shouldBeTrue("region.childAtIndex(0).traits != nonLandmarkText.traits");
     51
     52        shouldBeTrue("region.childAtIndex(0).traits == main.childAtIndex(0).traits");
    3353    }
    3454
  • trunk/Source/WebCore/ChangeLog

    r185666 r185675  
     12015-06-17  Chris Fleizach  <cfleizach@apple.com>
     2
     3        AX: VoiceOver in iOS not announcing generic WAI-ARIA region, even if labelled properly
     4        https://bugs.webkit.org/show_bug.cgi?id=146066
     5
     6        Reviewed by Darin Adler.
     7
     8        Allow the region role to identify as a landmark type.
     9
     10        Updated test: platform/ios-simulator/accessibility/landmark-types.html
     11
     12        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
     13        (-[WebAccessibilityObjectWrapper _accessibilityIsLandmarkRole:]):
     14
    1152015-06-17  Simon Fraser  <simon.fraser@apple.com>
    216
  • trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm

    r185649 r185675  
    434434{
    435435    switch (role) {
    436         case LandmarkApplicationRole:
    437         case LandmarkBannerRole:
    438         case LandmarkComplementaryRole:
    439         case LandmarkContentInfoRole:
    440         case LandmarkMainRole:
    441         case LandmarkNavigationRole:
    442         case LandmarkSearchRole:
    443             return YES;
    444         default:
    445             return NO;
     436    case DocumentRegionRole:
     437    case LandmarkApplicationRole:
     438    case LandmarkBannerRole:
     439    case LandmarkComplementaryRole:
     440    case LandmarkContentInfoRole:
     441    case LandmarkMainRole:
     442    case LandmarkNavigationRole:
     443    case LandmarkSearchRole:
     444        return YES;
     445    default:
     446        return NO;
    446447    }   
    447448}
Note: See TracChangeset for help on using the changeset viewer.