<?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>300090</bug_id>
          
          <creation_ts>2025-10-03 03:19:59 -0700</creation_ts>
          <short_desc>REGRESSION(296017@main): AX: at-spi role mapping is broken</short_desc>
          <delta_ts>2026-01-06 09:39:41 -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>All</rep_platform>
          <op_sys>All</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>lukastyrychtr</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>andresg_22</cc>
    
    <cc>cgarcia</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>mgorse</cc>
    
    <cc>rahim_abdi</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2148088</commentid>
    <comment_count>0</comment_count>
    <who name="">lukastyrychtr</who>
    <bug_when>2025-10-03 03:19:59 -0700</bug_when>
    <thetext>After 3d8ea36b3cc8 (the commit adding support for sectionhead and sectionfooter roles), the at-spi2 role mapping is wrong, because the commit allso removed the footer role, so each of the ones following is wrong, including, for example, the document web role.
I am unfortunately not knowledgeable enough about the contribution procedure, so I am reporting it instead of making the one line patch which would fix it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2148089</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2025-10-03 03:20:44 -0700</bug_when>
    <thetext>&lt;rdar://problem/161885093&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2149461</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2025-10-08 08:29:51 -0700</bug_when>
    <thetext>You say that a one-line patch would fix this, but... where? I see AccessibilityAtspi.cpp‎, AccessibilityAtspiEnums.h‎, AccessibilityObjectAtspi.cpp‎, and AccessibilityUIElementAtspi.cpp‎ were all updated. What else needs to be updated?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2149640</commentid>
    <comment_count>3</comment_count>
    <who name="">lukastyrychtr</who>
    <bug_when>2025-10-08 23:47:38 -0700</bug_when>
    <thetext>his one is the removed Footer member from the Role enum - as a result, the enum got out of sync from the upstream at-spi2 definition.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2149736</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2025-10-09 11:07:48 -0700</bug_when>
    <thetext>OK, I see you&apos;re talking about the Role enum defined in AccessibilityAtspiEnums.h‎, which no longer matches the AtspiRole enum defined in atspi-constants.h. Removing Footer is not the only problem. The addition of SectionFooter and SectionHeader is also going to break it.

There is zero indication that the WebCore enum is supposed to be kept in sync with the at-spi2 enum, so it&apos;s not reasonable to expect WebKit developers to not change it. And it looks like there are many other similar enums in this header that we could similarly break in the future.

Hi Carlos Garcia, can you look at this please? Why do we have to redefine the enums at all? At the very least, we should add warning comments to each one.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2165507</commentid>
    <comment_count>5</comment_count>
    <who name="Mike Gorse">mgorse</who>
    <bug_when>2025-12-12 13:18:01 -0800</bug_when>
    <thetext>I wonder why the tests in TestWebKitAccessibility.cpp wouldn&apos;t have caught this. Is this test run automatically? It has several tests that call atspi_accessible_get_role and assert that it returns the correct value, including some that are past ATSPI_ROLE_FOOTER in the enum.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2165567</commentid>
    <comment_count>6</comment_count>
    <who name="Mike Gorse">mgorse</who>
    <bug_when>2025-12-12 17:21:13 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/55343</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2167418</commentid>
    <comment_count>7</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2025-12-19 15:35:22 -0800</bug_when>
    <thetext>Committed 304783@main (7a4fc4e0025a): &lt;https://commits.webkit.org/304783@main&gt;

Reviewed commits have been landed. Closing PR #55343 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2169643</commentid>
    <comment_count>8</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2026-01-06 09:39:41 -0800</bug_when>
    <thetext>(In reply to Mike Gorse from comment #5)
&gt; I wonder why the tests in TestWebKitAccessibility.cpp wouldn&apos;t have caught
&gt; this. Is this test run automatically? It has several tests that call
&gt; atspi_accessible_get_role and assert that it returns the correct value,
&gt; including some that are past ATSPI_ROLE_FOOTER in the enum.

They are run automatically, but looks like they&apos;re all expected to fail, except for a few that are skipped. We would only notice if the non-skipped tests were to begin unexpectedly passing. See Tools/TestWebKitAPI/glib/TestExpectations.json, bug #279009, and bug #273682.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>