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

Changeset 259671 in webkit


Ignore:
Timestamp:
Apr 7, 2020, 2:14:16 PM (6 years ago)
Author:
jdiggs@igalia.com
Message:

AX: Change ATK mapping of the ARIA alert and alertdialog roles
https://bugs.webkit.org/show_bug.cgi?id=210121

Reviewed by Chris Fleizach.

Source/WebCore:

The ARIA alert role is a live region; not a dialog/message box. In contrast,
the ATK alert role is for dialogs such as a warning message which should be
presented immediately to the user. Because of the similarity in role names,
the original mappings in the Core-AAM were not ideal. They have recently
been fixed so we need to update our implementation accordingly.

Changed mappings

  • alertdialog from ATK_ROLE_DIALOG to ATK_ROLE_ALERT
  • alert from ATK_ROLE_ALERT to ATK_ROLE_NOTIFICATION

Updated existing tests to reflect this change.

  • accessibility/atk/WebKitAccessible.cpp:

(atkRole):

Tools:

Add support for ATK_ROLE_NOTIFICATION.

  • WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

LayoutTests:

  • accessibility/aria-mappings-expected.txt: Updated.
  • accessibility/gtk/xml-roles-exposed-expected.txt: Updated.
  • platform/gtk/accessibility/gtk/xml-roles-exposed-expected.txt: Updated.
  • platform/gtk/accessibility/roles-exposed-expected.txt: Updated.
Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r259669 r259671  
     12020-04-07  Joanmarie Diggs  <jdiggs@igalia.com>
     2
     3        AX: Change ATK mapping of the ARIA alert and alertdialog roles
     4        https://bugs.webkit.org/show_bug.cgi?id=210121
     5
     6        Reviewed by Chris Fleizach.
     7
     8        * accessibility/aria-mappings-expected.txt: Updated.
     9        * accessibility/gtk/xml-roles-exposed-expected.txt: Updated.
     10        * platform/gtk/accessibility/gtk/xml-roles-exposed-expected.txt: Updated.
     11        * platform/gtk/accessibility/roles-exposed-expected.txt: Updated.
     12
    1132020-04-07  Wenson Hsieh  <wenson_hsieh@apple.com>
    214
  • trunk/LayoutTests/accessibility/aria-mappings-expected.txt

    r215877 r259671  
    1818
    1919role="alert" should give a message with important, and usually time-sensitive, information.
    20 Role for 'alert' div is: AXRole: AXAlert
     20Role for 'alert' div is: AXRole: AXNotification
    2121
    2222
    2323role="alertdialog" is a dialog which contains an alert message.
    24 Role for 'alertdialog' div is: AXRole: AXDialog
     24Role for 'alertdialog' div is: AXRole: AXAlert
    2525
    2626
  • trunk/LayoutTests/accessibility/gtk/xml-roles-exposed-expected.txt

    r251515 r259671  
    44
    55
     6AXRole: AXNotification
     7AXParent: AXWebArea
     8AXChildren: 0
     9AXPosition:  { 0.00000, 0.00000 }
     10AXSize: { 0.00000, 0.00000 }
     11AXTitle:
     12AXDescription:
     13AXValue:
     14AXFocusable: 0
     15AXFocused: 0
     16AXSelectable: 0
     17AXSelected: 0
     18AXMultiSelectable: 0
     19AXEnabled: 1
     20AXExpanded: 0
     21AXRequired: 0
     22AXChecked: 0q
     23AXPlatformAttributes: atomic:true, relevant:additions text, live:assertive, container-live-role:alert, container-atomic:true, container-relevant:additions text, container-live:assertive, computed-role:alert, xml-roles:alert, tag:div, toolkit:WebKitGtk
     24------------
    625AXRole: AXAlert
    7 AXParent: AXWebArea
    8 AXChildren: 0
    9 AXPosition:  { 0.00000, 0.00000 }
    10 AXSize: { 0.00000, 0.00000 }
    11 AXTitle:
    12 AXDescription:
    13 AXValue:
    14 AXFocusable: 0
    15 AXFocused: 0
    16 AXSelectable: 0
    17 AXSelected: 0
    18 AXMultiSelectable: 0
    19 AXEnabled: 1
    20 AXExpanded: 0
    21 AXRequired: 0
    22 AXChecked: 0
    23 AXPlatformAttributes: atomic:true, relevant:additions text, live:assertive, container-live-role:alert, container-atomic:true, container-relevant:additions text, container-live:assertive, computed-role:alert, xml-roles:alert, tag:div, toolkit:WebKitGtk
    24 ------------
    25 AXRole: AXDialog
    2626AXParent: AXWebArea
    2727AXChildren: 0
  • trunk/LayoutTests/platform/gtk/accessibility/gtk/xml-roles-exposed-expected.txt

    r251515 r259671  
    44
    55
     6AXRole: AXNotification
     7AXParent: AXWebArea
     8AXChildren: 0
     9AXPosition:  { 0.00000, 0.00000 }
     10AXSize: { 0.00000, 0.00000 }
     11AXTitle:
     12AXDescription:
     13AXValue:
     14AXFocusable: 0
     15AXFocused: 0
     16AXSelectable: 0
     17AXSelected: 0
     18AXMultiSelectable: 0
     19AXEnabled: 1
     20AXExpanded: 0
     21AXRequired: 0
     22AXChecked: 0
     23AXPlatformAttributes: atomic:true, relevant:additions text, live:assertive, container-live-role:alert, container-atomic:true, container-relevant:additions text, container-live:assertive, computed-role:alert, xml-roles:alert, tag:div, toolkit:WebKitGtk
     24------------
    625AXRole: AXAlert
    7 AXParent: AXWebArea
    8 AXChildren: 0
    9 AXPosition:  { 0.00000, 0.00000 }
    10 AXSize: { 0.00000, 0.00000 }
    11 AXTitle:
    12 AXDescription:
    13 AXValue:
    14 AXFocusable: 0
    15 AXFocused: 0
    16 AXSelectable: 0
    17 AXSelected: 0
    18 AXMultiSelectable: 0
    19 AXEnabled: 1
    20 AXExpanded: 0
    21 AXRequired: 0
    22 AXChecked: 0
    23 AXPlatformAttributes: atomic:true, relevant:additions text, live:assertive, container-live-role:alert, container-atomic:true, container-relevant:additions text, container-live:assertive, computed-role:alert, xml-roles:alert, tag:div, toolkit:WebKitGtk
    24 ------------
    25 AXRole: AXDialog
    2626AXParent: AXWebArea
    2727AXChildren: 0
  • trunk/LayoutTests/platform/gtk/accessibility/roles-exposed-expected.txt

    r251515 r259671  
    489489     
    490490div[role=alert]
     491      AXRole: AXNotification
     492     
     493div[role=alertdialog]
    491494      AXRole: AXAlert
    492      
    493 div[role=alertdialog]
    494       AXRole: AXDialog
    495495     
    496496div[role=application]
  • trunk/Source/WebCore/ChangeLog

    r259659 r259671  
     12020-04-07  Joanmarie Diggs  <jdiggs@igalia.com>
     2
     3        AX: Change ATK mapping of the ARIA alert and alertdialog roles
     4        https://bugs.webkit.org/show_bug.cgi?id=210121
     5
     6        Reviewed by Chris Fleizach.
     7
     8        The ARIA alert role is a live region; not a dialog/message box. In contrast,
     9        the ATK alert role is for dialogs such as a warning message which should be
     10        presented immediately to the user. Because of the similarity in role names,
     11        the original mappings in the Core-AAM were not ideal. They have recently
     12        been fixed so we need to update our implementation accordingly.
     13
     14        Changed mappings
     15        - alertdialog from ATK_ROLE_DIALOG to ATK_ROLE_ALERT
     16        - alert from ATK_ROLE_ALERT to ATK_ROLE_NOTIFICATION
     17
     18        Updated existing tests to reflect this change.
     19
     20        * accessibility/atk/WebKitAccessible.cpp:
     21        (atkRole):
     22
    1232020-04-07  Antti Koivisto  <antti@apple.com>
    224
  • trunk/Source/WebCore/accessibility/atk/WebKitAccessible.cpp

    r257200 r259671  
    581581    switch (coreObject->roleValue()) {
    582582    case AccessibilityRole::ApplicationAlert:
     583        return ATK_ROLE_NOTIFICATION;
     584    case AccessibilityRole::ApplicationAlertDialog:
    583585        return ATK_ROLE_ALERT;
    584     case AccessibilityRole::ApplicationAlertDialog:
    585586    case AccessibilityRole::ApplicationDialog:
    586587        return ATK_ROLE_DIALOG;
  • trunk/Tools/ChangeLog

    r259669 r259671  
     12020-04-07  Joanmarie Diggs  <jdiggs@igalia.com>
     2
     3        AX: Change ATK mapping of the ARIA alert and alertdialog roles
     4        https://bugs.webkit.org/show_bug.cgi?id=210121
     5
     6        Reviewed by Chris Fleizach.
     7
     8        Add support for ATK_ROLE_NOTIFICATION.
     9
     10        * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
     11
    1122020-04-07  Wenson Hsieh  <wenson_hsieh@apple.com>
    213
  • trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp

    r253975 r259671  
    429429    case ATK_ROLE_MENU_ITEM:
    430430        return "AXMenuItem";
     431    case ATK_ROLE_NOTIFICATION:
     432        return "AXNotification";
    431433    case ATK_ROLE_PAGE_TAB:
    432434        return "AXTab";
Note: See TracChangeset for help on using the changeset viewer.