<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>250126</bug_id>
          
          <creation_ts>2023-01-05 04:55:50 -0800</creation_ts>
          <short_desc>RELEASE_ASSERT_NOT_REACHED in AccessibilityObjectAtspi::role() with MathML scripts</short_desc>
          <delta_ts>2023-01-16 23:28:49 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Accessibility</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Frédéric Wang Nélar">fred.wang</reporter>
          <assigned_to name="Frédéric Wang Nélar">fred.wang</assigned_to>
          <cc>andresg_22</cc>
    
    <cc>cgarcia</cc>
    
    <cc>jdiggs</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1923127</commentid>
    <comment_count>0</comment_count>
      <attachid>464346</attachid>
    <who name="Frédéric Wang Nélar">fred.wang</who>
    <bug_when>2023-01-05 04:55:50 -0800</bug_when>
    <thetext>Created attachment 464346
Reduced testcase

Original repro: Open https://www.mathjax.org/#samples and click the select element to change the rendering mode.

Attached is a testcase reduced with the help of lithium, which involves munder/mover/munderover elements.

We are reaching the following assert:

https://searchfox.org/wubkat/source/Source/WebCore/accessibility/atspi/AccessibilityObjectAtspi.cpp#393

Per https://w3c.github.io/mathml-aam/ AccessibilityObjectAtspi::effectiveRole() should return Atspi::Role::Section for isMathUnderOver().

Here is a simple fix:

diff --git a/Source/WebCore/accessibility/atspi/AccessibilityObjectAtspi.cpp b/Source/WebCore/accessibility/atspi/AccessibilityObjectAtspi.cpp
index 0a869b206589..afaf6b9b0fb7 100644
--- a/Source/WebCore/accessibility/atspi/AccessibilityObjectAtspi.cpp
+++ b/Source/WebCore/accessibility/atspi/AccessibilityObjectAtspi.cpp
@@ -1225,7 +1225,7 @@ std::optional&lt;unsigned&gt; AccessibilityObjectAtspi::effectiveRole() const
             return Atspi::Role::TableRow;
         if (m_coreObject-&gt;isMathTableCell())
             return Atspi::Role::TableCell;
-        if (m_coreObject-&gt;isMathSubscriptSuperscript() || m_coreObject-&gt;isMathMultiscript())
+        if (m_coreObject-&gt;isMathUnderOver() || m_coreObject-&gt;isMathSubscriptSuperscript() || m_coreObject-&gt;isMathMultiscript())
             return Atspi::Role::Section;
         if (m_coreObject-&gt;isMathFraction())
             return Atspi::Role::MathFraction;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1923128</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-01-05 04:56:04 -0800</bug_when>
    <thetext>&lt;rdar://problem/103909843&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1923140</commentid>
    <comment_count>2</comment_count>
    <who name="Frédéric Wang Nélar">fred.wang</who>
    <bug_when>2023-01-05 07:03:43 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/8234</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1925931</commentid>
    <comment_count>3</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-01-16 23:28:47 -0800</bug_when>
    <thetext>Committed 258971@main (c7e23e3505d3): &lt;https://commits.webkit.org/258971@main&gt;

Reviewed commits have been landed. Closing PR #8234 and removing active labels.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>464346</attachid>
            <date>2023-01-05 04:55:50 -0800</date>
            <delta_ts>2023-01-05 04:55:50 -0800</delta_ts>
            <desc>Reduced testcase</desc>
            <filename>a.html</filename>
            <type>text/html</type>
            <size>276</size>
            <attacher name="Frédéric Wang Nélar">fred.wang</attacher>
            
              <data encoding="base64">PCFET0NUWVBFPgoKPHA+Q2xpY2sgYW55IG9mIHRoZXNlIGVsZW1lbnRzOjwvcD4KCjxtYXRoPgog
IDxtdW5kZXI+CiAgICA8bW4+MDwvbW4+CiAgICA8bW4+MTwvbW4+CiAgPC9tdW5kZXI+CjwvbWF0
aD4KCjxtYXRoPgogIDxtb3Zlcj4KICAgIDxtbj4wPC9tbj4KICAgIDxtbj4xPC9tbj4KICA8L21v
dmVyPgo8L21hdGg+Cgo8bWF0aD4KICA8bXVuZGVyb3Zlcj4KICAgIDxtbj4wPC9tbj4KICAgIDxt
bj4xPC9tbj4KICAgIDxtbj4yPC9tbj4KICA8L211bmRlcm92ZXI+CjwvbWF0aD4K
</data>

          </attachment>
      

    </bug>

</bugzilla>