Bug 250126 - RELEASE_ASSERT_NOT_REACHED in AccessibilityObjectAtspi::role() with MathML scripts
Summary: RELEASE_ASSERT_NOT_REACHED in AccessibilityObjectAtspi::role() with MathML sc...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Frédéric Wang (:fredw)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-01-05 04:55 PST by Frédéric Wang (:fredw)
Modified: 2023-01-16 23:28 PST (History)
4 users (show)

See Also:


Attachments
Reduced testcase (276 bytes, text/html)
2023-01-05 04:55 PST, Frédéric Wang (:fredw)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Frédéric Wang (:fredw) 2023-01-05 04:55:50 PST
Created attachment 464346 [details]
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<unsigned> AccessibilityObjectAtspi::effectiveRole() const
             return Atspi::Role::TableRow;
         if (m_coreObject->isMathTableCell())
             return Atspi::Role::TableCell;
-        if (m_coreObject->isMathSubscriptSuperscript() || m_coreObject->isMathMultiscript())
+        if (m_coreObject->isMathUnderOver() || m_coreObject->isMathSubscriptSuperscript() || m_coreObject->isMathMultiscript())
             return Atspi::Role::Section;
         if (m_coreObject->isMathFraction())
             return Atspi::Role::MathFraction;
Comment 1 Radar WebKit Bug Importer 2023-01-05 04:56:04 PST
<rdar://problem/103909843>
Comment 2 Frédéric Wang (:fredw) 2023-01-05 07:03:43 PST
Pull request: https://github.com/WebKit/WebKit/pull/8234
Comment 3 EWS 2023-01-16 23:28:47 PST
Committed 258971@main (c7e23e3505d3): <https://commits.webkit.org/258971@main>

Reviewed commits have been landed. Closing PR #8234 and removing active labels.