Changeset 271536 in webkit


Ignore:
Timestamp:
Jan 15, 2021 2:54:07 PM (18 months ago)
Author:
Chris Fleizach
Message:

AX: increment/decrement synthetic arrow events don't work in ARIA slider examples
https://bugs.webkit.org/show_bug.cgi?id=220626
<rdar://problem/73228924>

Reviewed by Zalan Bujtas.

Source/WebCore:

keyCode is still expected to be filled in with standard codes for arrow keys.

Updated test: accessibility/keyevents-posted-for-increment-actions.html

  • accessibility/AccessibilityNodeObject.cpp:

(WebCore::AccessibilityNodeObject::postKeyboardKeysForValueChange):

LayoutTests:

  • accessibility/keyevents-posted-for-increment-actions-expected.txt:
  • accessibility/keyevents-posted-for-increment-actions.html:
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r271531 r271536  
     12021-01-15  Chris Fleizach  <cfleizach@apple.com>
     2
     3        AX: increment/decrement synthetic arrow events don't work in ARIA slider examples
     4        https://bugs.webkit.org/show_bug.cgi?id=220626
     5        <rdar://problem/73228924>
     6
     7        Reviewed by Zalan Bujtas.
     8
     9        * accessibility/keyevents-posted-for-increment-actions-expected.txt:
     10        * accessibility/keyevents-posted-for-increment-actions.html:
     11
    1122021-01-15  Jer Noble  <jer.noble@apple.com>
    213
  • trunk/LayoutTests/accessibility/keyevents-posted-for-increment-actions-expected.txt

    r263823 r271536  
    66Increment/Decrement - LTR
    77Horizontal orientation
    8 Keycode received: identifier: right key name: ArrowRight
    9 Keycode received: identifier: left key name: ArrowLeft
     8Keycode received: identifier: right key name: ArrowRight key code: 39
     9Keycode received: identifier: left key name: ArrowLeft key code: 37
    1010Vertical orientation
    11 Keycode received: identifier: up key name: ArrowUp
    12 Keycode received: identifier: down key name: ArrowDown
     11Keycode received: identifier: up key name: ArrowUp key code: 38
     12Keycode received: identifier: down key name: ArrowDown key code: 40
    1313Increment/Decrement - RTL
    1414Horizontal orientation
    15 Keycode received: identifier: left key name: ArrowLeft
    16 Keycode received: identifier: right key name: ArrowRight
     15Keycode received: identifier: left key name: ArrowLeft key code: 37
     16Keycode received: identifier: right key name: ArrowRight key code: 39
    1717Vertical orientation
    18 Keycode received: identifier: up key name: ArrowUp
    19 Keycode received: identifier: down key name: ArrowDown
     18Keycode received: identifier: up key name: ArrowUp key code: 38
     19Keycode received: identifier: down key name: ArrowDown key code: 40
    2020PASS successfullyParsed is true
    2121
  • trunk/LayoutTests/accessibility/keyevents-posted-for-increment-actions.html

    r268254 r271536  
    2121    var keyCount = 0;
    2222    function handleKeyDown(event) {
    23         debug("Keycode received: identifier: " + event.keyIdentifier + " key name: " + event.key);
     23        debug("Keycode received: identifier: " + event.keyIdentifier + " key name: " + event.key + " key code: " + event.keyCode);
    2424        event.preventDefault();
    2525        event.stopPropagation();
  • trunk/Source/WebCore/ChangeLog

    r271533 r271536  
     12021-01-15  Chris Fleizach  <cfleizach@apple.com>
     2
     3        AX: increment/decrement synthetic arrow events don't work in ARIA slider examples
     4        https://bugs.webkit.org/show_bug.cgi?id=220626
     5        <rdar://problem/73228924>
     6
     7        Reviewed by Zalan Bujtas.
     8
     9        keyCode is still expected to be filled in with standard codes for arrow keys.
     10
     11        Updated test: accessibility/keyevents-posted-for-increment-actions.html
     12
     13        * accessibility/AccessibilityNodeObject.cpp:
     14        (WebCore::AccessibilityNodeObject::postKeyboardKeysForValueChange):
     15
    1162021-01-15  Chris Dumez  <cdumez@apple.com>
    217
  • trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp

    r270333 r271536  
    11351135    bool isLTR = page()->userInterfaceLayoutDirection() == UserInterfaceLayoutDirection::LTR;
    11361136   
    1137     keyInit.key = increase ? vertical ? "ArrowUp"_s : isLTR ? "ArrowRight"_s : "ArrowLeft"_s : vertical ? "ArrowDown"_s : isLTR ? "ArrowLeft"_s : "ArrowRight"_s;
    1138     keyInit.keyIdentifier = increase ? vertical ? "up"_s : isLTR ? "right"_s : "left"_s : vertical ? "down"_s : isLTR ? "left"_s : "right"_s;
     1137    typedef enum { left = 37, up = 38, right = 39, down = 40 } keyCode;
     1138    keyInit.key = increase ? (vertical ? "ArrowUp"_s : (isLTR ? "ArrowRight"_s : "ArrowLeft"_s)) : (vertical ? "ArrowDown"_s : (isLTR ? "ArrowLeft"_s : "ArrowRight"_s));
     1139    keyInit.keyCode = increase ? (vertical ? keyCode::up : (isLTR ? keyCode::right : keyCode::left)) : (vertical ? keyCode::down : (isLTR ? keyCode::left : keyCode::right));
     1140    keyInit.keyIdentifier = increase ? (vertical ? "up"_s : (isLTR ? "right"_s : "left"_s)) : (vertical ? "down"_s : (isLTR ? "left"_s : "right"_s));
    11391141
    11401142    return dispatchSimulatedKeyboardUpDownEvent(this, keyInit);
Note: See TracChangeset for help on using the changeset viewer.