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

Changeset 280705 in webkit


Ignore:
Timestamp:
Aug 5, 2021, 3:47:59 PM (5 years ago)
Author:
Andres Gonzalez
Message:

VoiceOver is not announcing the state as selected/unselected when an item is selected in a grid.
https://bugs.webkit.org/show_bug.cgi?id=228840
<rdar://78225826>

Reviewed by Chris Fleizach.

Source/WebCore:

Test: accessibility/selected-state-changed-notifications.html.

On iOS, a table/grid cell element is not exposed to AX clients. Instead
the content of the cell is. This patch ensures that if the cell element
is selected, the AX objects that represent the content inside the cell
will inherit the selected state from the cell.

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityObjectWrapper _accessibilityTraitsFromAncestors]):

LayoutTests:

  • accessibility/selected-state-changed-notifications.html:
  • platform/ios/TestExpectations:
  • platform/ios/accessibility/selected-state-changed-notifications-expected.txt: Added.
Location:
trunk
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r280703 r280705  
     12021-08-05  Andres Gonzalez  <andresg_22@apple.com>
     2
     3        VoiceOver is not announcing the state as selected/unselected when an item is selected in a grid.
     4        https://bugs.webkit.org/show_bug.cgi?id=228840
     5        <rdar://78225826>
     6
     7        Reviewed by Chris Fleizach.
     8
     9        * accessibility/selected-state-changed-notifications.html:
     10        * platform/ios/TestExpectations:
     11        * platform/ios/accessibility/selected-state-changed-notifications-expected.txt: Added.
     12
    1132021-08-05  Tim Nguyen  <ntim@apple.com>
    214
  • trunk/LayoutTests/accessibility/selected-state-changed-notifications.html

    r280633 r280705  
    3232    if (window.accessibilityController) {
    3333        window.jsTestIsAsync = true;
     34        var platform = accessibilityController.platformName;
    3435
    3536        var notificationCount = 0;
     
    4344        var axSelectable = accessibilityController.accessibleElementById("selectable");
    4445        shouldBeFalse("axSelectable.isSelected");
     46        // On iOS, the cell element is not exposed to clients, but instead its content.
     47        // So make sure that the selected state of the contained static text matches the state of the cell.
     48        if (platform == "ios")
     49            shouldBeFalse("axSelectable.children[0].isSelected");
    4550
    4651        axSelectable.press();
     
    5055            });
    5156            shouldBeTrue("axSelectable.isSelected");
     57            if (platform == "ios")
     58                shouldBeTrue("axSelectable.children[0].isSelected");
    5259
    5360            axSelectable.press();
     
    5663            });
    5764            shouldBeFalse("axSelectable.isSelected");
     65            if (platform == "ios")
     66                shouldBeFalse("axSelectable.children[0].isSelected");
    5867
    5968            finishJSTest();
  • trunk/LayoutTests/platform/ios/TestExpectations

    r280530 r280705  
    21032103webkit.org/b/150366 accessibility/aria-table-attributes.html [ Pass ]
    21042104
     2105accessibility/selected-state-changed-notifications.html [ Pass ]
     2106
    21052107# Enable "attachment element" test for iOS
    21062108accessibility/attachment-element.html [ Pass ]
  • trunk/Source/WebCore/ChangeLog

    r280703 r280705  
     12021-08-05  Andres Gonzalez  <andresg_22@apple.com>
     2
     3        VoiceOver is not announcing the state as selected/unselected when an item is selected in a grid.
     4        https://bugs.webkit.org/show_bug.cgi?id=228840
     5        <rdar://78225826>
     6
     7        Reviewed by Chris Fleizach.
     8
     9        Test: accessibility/selected-state-changed-notifications.html.
     10
     11        On iOS, a table/grid cell element is not exposed to AX clients. Instead
     12        the content of the cell is. This patch ensures that if the cell element
     13        is selected, the AX objects that represent the content inside the cell
     14        will inherit the selected state from the cell.
     15
     16        * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
     17        (-[WebAccessibilityObjectWrapper _accessibilityTraitsFromAncestors]):
     18
    1192021-08-05  Tim Nguyen  <ntim@apple.com>
    220
  • trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm

    r280529 r280705  
    697697        case AccessibilityRole::Heading:
    698698            traits |= [self _axHeaderTrait];
     699            break;
     700        case AccessibilityRole::Cell:
     701        case AccessibilityRole::GridCell:
     702            if (parent->isSelected())
     703                traits |= [self _axSelectedTrait];
    699704            break;
    700705        default:
Note: See TracChangeset for help on using the changeset viewer.