Changeset 284246 in webkit


Ignore:
Timestamp:
Oct 15, 2021 8:13:22 AM (9 months ago)
Author:
commit-queue@webkit.org
Message:

AX: role="math" elements are no longer considered to have presentational children
https://bugs.webkit.org/show_bug.cgi?id=231756

Patch by Tyler Wilcock <Tyler Wilcock> on 2021-10-15
Reviewed by Chris Fleizach and Darin Adler.

Source/WebCore:

As of WAI-ARIA 1.2, role="math" elements are no longer considered to
have presentational children.

Test: accessibility/math-has-non-presentational-children.html

  • accessibility/AccessibilityNodeObject.cpp:

(WebCore::AccessibilityNodeObject::canHaveChildren const):
Allow AccessibilityRole::DocumentMath elements to have children.

LayoutTests:

  • accessibility/math-has-non-presentational-children-expected.txt: Added.
  • accessibility/math-has-non-presentational-children.html: Added.
  • accessibility/presentational-children-expected.txt:
  • accessibility/presentational-children.html:

Remove the role="math" element from this test because as of WAI-ARIA
1.2 role="math" is no longer considered to have presentational children.
Also change this test to ensure role="meter" elements are considered to
have presentational children because that testcase was missing.

Location:
trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r284245 r284246  
     12021-10-15  Tyler Wilcock  <tyler_w@apple.com>
     2
     3        AX: role="math" elements are no longer considered to have presentational children
     4        https://bugs.webkit.org/show_bug.cgi?id=231756
     5
     6        Reviewed by Chris Fleizach and Darin Adler.
     7
     8        * accessibility/math-has-non-presentational-children-expected.txt: Added.
     9        * accessibility/math-has-non-presentational-children.html: Added.
     10
     11        * accessibility/presentational-children-expected.txt:
     12        * accessibility/presentational-children.html:
     13        Remove the role="math" element from this test because as of WAI-ARIA
     14        1.2 role="math" is no longer considered to have presentational children.
     15        Also change this test to ensure role="meter" elements are considered to
     16        have presentational children because that testcase was missing.
     17
    1182021-10-15  Tyler Wilcock  <tyler_w@apple.com>
    219
  • trunk/LayoutTests/accessibility/presentational-children-expected.txt

    r222544 r284246  
    77checkbox childrenCount: 0
    88img childrenCount: 0
    9 math childrenCount: 0
    109menuitemcheckbox childrenCount: 0
    1110menuitemradio childrenCount: 0
     11meter childrenCount: 0
    1212option childrenCount: 0
    1313progressbar childrenCount: 0
  • trunk/LayoutTests/accessibility/presentational-children.html

    r222544 r284246  
    99  <div role="checkbox" tabindex="0" class="ex"><div>a</div><div>b</div></div>
    1010  <div role="img" tabindex="0" class="ex"><div>a</div><div>b</div></div>
    11   <div role="math" tabindex="0" class="ex"><div>a</div><div>b</div></div>
    1211  <div role="menu">
    1312    <div role="menuitemcheckbox" tabindex="0" class="ex"><div>a</div><div>b</div></div>
    1413    <div role="menuitemradio" tabindex="0" class="ex"><div>a</div><div>b</div></div>
    1514  </div>
     15  <div role="meter" tabindex="0" class="ex"><div>a</div><div>b</div></div>
    1616  <div role="listbox">
    1717    <div role="option" tabindex="0" class="ex"><div>a</div><div>b</div></div>
  • trunk/Source/WebCore/ChangeLog

    r284245 r284246  
     12021-10-15  Tyler Wilcock  <tyler_w@apple.com>
     2
     3        AX: role="math" elements are no longer considered to have presentational children
     4        https://bugs.webkit.org/show_bug.cgi?id=231756
     5
     6        Reviewed by Chris Fleizach and Darin Adler.
     7
     8        As of WAI-ARIA 1.2, role="math" elements are no longer considered to
     9        have presentational children.
     10
     11        Test: accessibility/math-has-non-presentational-children.html
     12
     13        * accessibility/AccessibilityNodeObject.cpp:
     14        (WebCore::AccessibilityNodeObject::canHaveChildren const):
     15        Allow AccessibilityRole::DocumentMath elements to have children.
     16
    1172021-10-15  Tyler Wilcock  <tyler_w@apple.com>
    218
  • trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp

    r283564 r284246  
    395395    case AccessibilityRole::Meter:
    396396        return false;
    397     case AccessibilityRole::DocumentMath:
    398 #if ENABLE(MATHML)
    399         return node()->isMathMLElement();
    400 #endif
    401         return false;
    402397    default:
    403398        return true;
Note: See TracChangeset for help on using the changeset viewer.