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

Changeset 294848 in webkit


Ignore:
Timestamp:
May 25, 2022, 4:50:09 PM (4 years ago)
Author:
Alan Coon
Message:

Cherry-pick f5e42d63fc9. rdar://problem/93601919

Expose the correct role, subrole and role description properties for the <dialog> element.
​https://bugs.webkit.org/show_bug.cgi?id=236359

Reviewed by Chris Fleizach.

Source/WebCore:

Test: accessibility/dialog-properties.html

Elements with role="dialog" are exposed to accessibility clients with
role AXGroup, subrole AXApplicationDialog and role description
"web dialog". This patch implements this behavior for the <dialog>
element.

  • accessibility/AccessibilityNodeObject.cpp: (WebCore::AccessibilityNodeObject::determineAccessibilityRoleFromNode const):
  • accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::defaultObjectInclusion const):

LayoutTests:

Tests that these AX properties have the expected values both when the
dialog is shown modal or modeless.

  • accessibility/dialog-properties-expected.txt: Added.
  • accessibility/dialog-properties.html: Added.

Canonical link: ​https://commits.webkit.org/247198@main
git-svn-id: ​https://svn.webkit.org/repository/webkit/trunk@289713 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Location:
branches/safari-613-branch
Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-613-branch/LayoutTests/ChangeLog

    r294844 r294848  
     12022-05-25  Alan Coon  <alancoon@apple.com>
     2
     3        Cherry-pick 1a810ee6f98a. rdar://problem/87980543
     4
     5    Expose the correct role, subrole and role description properties for the <dialog> element.
     6    https://bugs.webkit.org/show_bug.cgi?id=236359
     7   
     8    Reviewed by Chris Fleizach.
     9   
     10    Source/WebCore:
     11   
     12    Test: accessibility/dialog-properties.html
     13   
     14    Elements with role="dialog" are exposed to accessibility clients with
     15    role AXGroup, subrole AXApplicationDialog and role description
     16    "web dialog". This patch implements this behavior for the <dialog>
     17    element.
     18   
     19    * accessibility/AccessibilityNodeObject.cpp:
     20    (WebCore::AccessibilityNodeObject::determineAccessibilityRoleFromNode const):
     21    * accessibility/AccessibilityObject.cpp:
     22    (WebCore::AccessibilityObject::defaultObjectInclusion const):
     23   
     24    LayoutTests:
     25   
     26    Tests that these AX properties have the expected values both when the
     27    dialog is shown modal or modeless.
     28   
     29    * accessibility/dialog-properties-expected.txt: Added.
     30    * accessibility/dialog-properties.html: Added.
     31   
     32    Canonical link: https://commits.webkit.org/247198@main
     33    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289713 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     34
     35    2022-02-13  Andres Gonzalez  <andresg_22@apple.com>
     36
     37            Expose the correct role, subrole and role description properties for the <dialog> element.
     38            https://bugs.webkit.org/show_bug.cgi?id=236359
     39
     40            Reviewed by Chris Fleizach.
     41
     42            Tests that these AX properties have the expected values both when the
     43            dialog is shown modal or modeless.
     44
     45            * accessibility/dialog-properties-expected.txt: Added.
     46            * accessibility/dialog-properties.html: Added.
     47
    1482022-05-19  Alan Coon  <alancoon@apple.com>
    249
  • branches/safari-613-branch/LayoutTests/platform/gtk/TestExpectations

    r289297 r294848  
    21312131# UNSORTED Expectations. When in doubt, put it here.
    21322132#////////////////////////////////////////////////////////////////////////////////////////
     2133
     2134accessibility/dialog-properties.html [ Skip ]
  • branches/safari-613-branch/LayoutTests/platform/win/TestExpectations

    r293471 r294848  
    47404740accessibility/selected-state-changed-notifications.html [ Skip ]
    47414741accessibility/element-line-rects-and-text.html [ Skip ]
     4742accessibility/dialog-properties.html [ Skip ]
    47424743
    47434744webkit.org/b/229247 http/tests/fetch/keepalive-fetch-2.html [ Pass Failure ]
  • branches/safari-613-branch/Source/WebCore/ChangeLog

    r294846 r294848  
     12022-05-25  Alan Coon  <alancoon@apple.com>
     2
     3        Cherry-pick 1a810ee6f98a. rdar://problem/87980543
     4
     5    Expose the correct role, subrole and role description properties for the <dialog> element.
     6    https://bugs.webkit.org/show_bug.cgi?id=236359
     7   
     8    Reviewed by Chris Fleizach.
     9   
     10    Source/WebCore:
     11   
     12    Test: accessibility/dialog-properties.html
     13   
     14    Elements with role="dialog" are exposed to accessibility clients with
     15    role AXGroup, subrole AXApplicationDialog and role description
     16    "web dialog". This patch implements this behavior for the <dialog>
     17    element.
     18   
     19    * accessibility/AccessibilityNodeObject.cpp:
     20    (WebCore::AccessibilityNodeObject::determineAccessibilityRoleFromNode const):
     21    * accessibility/AccessibilityObject.cpp:
     22    (WebCore::AccessibilityObject::defaultObjectInclusion const):
     23   
     24    LayoutTests:
     25   
     26    Tests that these AX properties have the expected values both when the
     27    dialog is shown modal or modeless.
     28   
     29    * accessibility/dialog-properties-expected.txt: Added.
     30    * accessibility/dialog-properties.html: Added.
     31   
     32    Canonical link: https://commits.webkit.org/247198@main
     33    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289713 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     34
     35    2022-02-13  Andres Gonzalez  <andresg_22@apple.com>
     36
     37            Expose the correct role, subrole and role description properties for the <dialog> element.
     38            https://bugs.webkit.org/show_bug.cgi?id=236359
     39
     40            Reviewed by Chris Fleizach.
     41
     42            Test: accessibility/dialog-properties.html
     43
     44            Elements with role="dialog" are exposed to accessibility clients with
     45            role AXGroup, subrole AXApplicationDialog and role description
     46            "web dialog". This patch implements this behavior for the <dialog>
     47            element.
     48
     49            * accessibility/AccessibilityNodeObject.cpp:
     50            (WebCore::AccessibilityNodeObject::determineAccessibilityRoleFromNode const):
     51            * accessibility/AccessibilityObject.cpp:
     52            (WebCore::AccessibilityObject::defaultObjectInclusion const):
     53
    1542022-05-19  Alan Coon  <alancoon@apple.com>
    255
  • branches/safari-613-branch/Source/WebCore/accessibility/AccessibilityNodeObject.cpp

    r287552 r294848  
    283283    if (is<HTMLLabelElement>(*node()))
    284284        return AccessibilityRole::Label;
     285   
     286    if (node()->hasTagName(dialogTag))
     287        return AccessibilityRole::ApplicationDialog;
     288   
    285289    if (is<Element>(*node()) && downcast<Element>(*node()).isFocusable())
    286290        return AccessibilityRole::Group;
    287    
     291
    288292    return AccessibilityRole::Unknown;
    289293}
  • branches/safari-613-branch/Source/WebCore/accessibility/AccessibilityObject.cpp

    r293480 r294848  
    35433543{
    35443544    bool useParentData = !m_isIgnoredFromParentData.isNull();
    3545    
     3545
    35463546    if (useParentData ? m_isIgnoredFromParentData.isAXHidden : isAXHidden())
    35473547        return AccessibilityObjectInclusion::IgnoreObject;
    … …  
    35493549    if (renderer() && renderer()->style().effectiveInert())
    35503550        return AccessibilityObjectInclusion::IgnoreObject;
    3551    
     3551
    35523552    if (useParentData ? m_isIgnoredFromParentData.isPresentationalChildOfAriaRole : isPresentationalChildOfAriaRole())
    35533553        return AccessibilityObjectInclusion::IgnoreObject;
    3554    
     3554
     3555    // Include <dialog> elements and elements with role="dialog".
     3556    if (roleValue() == AccessibilityRole::ApplicationDialog)
     3557        return AccessibilityObjectInclusion::IncludeObject;
     3558
    35553559    return accessibilityPlatformIncludesObject();
    35563560}
Note: See TracChangeset for help on using the changeset viewer.