Skip to content

fix(libSceNKWebKit): test the 3.20 role numbers in AccessibilityObject::isARIAInput - #24626

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
ToRaNek:fix/nkwebkit-is-aria-input-legacy-roles
Nov 21, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
ToRaNek:fix/nkwebkit-is-aria-input-legacy-roles

Conversation

@ToRaNek

@ToRaNek ToRaNek commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

What

AccessibilityObject::isARIAInput compared its argument with the role numbers of the wrong WebKit revision.

The export is in the 3.20 inventory only. AccessibilityRole is a plain 32-bit enum whose enumerators shift whenever a role is added, and the port used the numbers of the later revision. In the WebKit of that module (AccessibilityObjectInterface.h L81) the five roles the function accepts (AccessibilityObject.cpp L760-L772) are:

Role 3.20 What the port tested
CheckBox 20 20
RadioButton 96 98
SearchField 110 112
Switch 122 125
TextField 136 139

So for a 3.20 caller a radio button, a search field, a switch and a text field were not inputs, while 98, 112, 125 and 139, which are RowHeader, Slider, SVGText and Tree in that revision, were.

The 151-value enum is identical on 2020-06-13 (WebKit 34fe4d7c1658), 2020-09-10 and 2020-11-12 (9fd169d0da68), the window the 3.20 names allow, so the numbers do not depend on where the module sits in it.

isARIAControl and ariaRoleToWebCoreRole are in the later inventory and keep the later numbers. isARIAControl used to call the isARIAInput export; it now calls an internal helper with the same later numbers, so its results are unchanged.

Tested

Windows 11, MinGW GCC 15.2.

  • Red first: with the test change and only the parameter type changed in the library, nkwebkit_accessibilityobjectroles fails on main's numbers at the first of the four roles.
  • Green with the fix: every value from 0 to 200 is checked against the 3.20 list for isARIAInput and against the later list for isARIAControl, plus five values outside the enum, including two whose low byte or low 16 bits are an accepted role.
  • Negative control: with RadioButton put back to 98, the test fails.
  • All 169 nkwebkit_* tests and patched_libraries pass on the branch.
  • python tools/check_conventions.py --base origin/main and python tools/debt_fold.py --check pass.

Not tested on a console.

Overlap (python tools/pr_overlap.py --branch fix/nkwebkit-is-aria-input-legacy-roles):

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt and the licence notice of code adapted from upstream (see AGENTS.md)
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

…t::isARIAInput

isARIAInput is in the 3.20 inventory only, but compared its argument
with the AccessibilityRole numbers of the later revision. In the WebKit
of that module RadioButton is 96, SearchField 110, Switch 122 and
TextField 136, not 98, 112, 125 and 139, so four input roles were
refused and RowHeader, Slider, SVGText and Tree were accepted.

isARIAControl, which the later inventory has, keeps the later numbers.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@kiwe147

kiwe147 commented Nov 20, 2026

Copy link
Copy Markdown

Tested head 9667c8cdc4, applied with git apply on main fd4aeed483 together with the other sixteen PRs of one batch (#24596, #24594, #24595, #24599, #24600, #24602, #24593, #24659, #24651, #24625, #24624, #24456, #24656, #22380, #24502, #24351). All seventeen applied without conflicts. The tree built except libSceAjm.prx: #24659 breaks it with duplicate patched export name: -qLsfDAywIY (checked alone on main, reported there). No other target failed to build.

Setup: Windows 11 Pro 10.0.26200, Ryzen 7 9800X3D, WinLibs GCC 15.2.0 r7, Release, BUILD_TESTING=ON. GPUs: NVIDIA GeForce RTX 3080 (driver 621.24) and the AMD Radeon iGPU of the CPU (gfx1036, driver 32.0.21036.18). No validation layer. iGPU run: ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 ANYPS5_GPU="AMD Radeon", agc_/video tests only.

tests RTX 3080 iGPU
nkwebkit_accessibilityobjectroles (1 test) all pass outside the iGPU subset

Whole batch: the full ctest -j 12 (6524 tests) on the RTX 3080 has 4 failures, and all 4 also fail on main fd4aeed483 (agc_driver_stencil_plane_memory, agc_driver_msaa_dcc_unwatch, agc_storage_write_back_host_retile, and pr_overlap_names, which needs a newer Python than my 3.10). The 2125 agc_/video tests on the iGPU fail agc_driver_stencil_plane_memory (also on main), agc_driver_store_over_untracked (also fails alone on main on this iGPU, 6 of 6) and agc_driver_image_table_packed_guards (passes 5 of 5 alone on this tree, known flaky). None of this batch touches AGC.

This is one combined tree, not a run of this PR alone.

AI-assisted: yes (Claude Code)

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no blocking findings

The inspected changes separate the legacy role values used by isARIAInput from the later role values used by isARIAControl, and I found no verified defect in the changed code.

What I ran

Reviewed head 9667c8cdc4ed2150eb3482991d4345817f08ce16. I did not run commands or tests. The PR description reports Windows 11 / MinGW GCC 15.2 test and convention-check results; those were not run by me.

Results

Check Result Note
Code review passed Four changed files read
Tests and checks not run Author-reported results only

Negative control

Not run by me. The PR description reports that restoring RadioButton to 98 makes the test fail.

Findings

Blocking

None.

Non-blocking

None.

Sources

The changed declaration gives isARIAInput a dedicated 32-bit legacy role type; its implementation checks the five stated values, while isARIAControl continues using the later role enum (AccessibilityObjectExports.hpp:193, AccessibilityObjectRoles.cpp:238). The added test checks values 0–200 and several out-of-range values (AccessibilityObjectRoles.cpp:70).

Not verified

I read all four files listed as changed in the manifest: core/libs/prx/libSceNKWebKit/include/AccessibilityObjectExports.hpp, core/libs/prx/libSceNKWebKit/src/AccessibilityObjectRoles.cpp, core/libs/prx/libSceNKWebKit/tests/AccessibilityObjectRoles.cpp, and docs/dev/debt/changes/fix-nkwebkit-is-aria-input-legacy-roles.md. The prepared file listing shows all four included and no exclusions. I did not independently verify the WebKit inventory sources, run tests or checks, or test console behavior.

To get this to a good state

Nothing is required. Optional: run the reported tests and checks on this head and verify behavior against a console module when available.

@oneandonlydean
oneandonlydean merged commit aa880d6 into boykopovar:main Nov 21, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants