Repository navigation
fix(libSceNKWebKit): test the 3.20 role numbers in AccessibilityObject::isARIAInput - #24626
Conversation
…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>
|
Tested head Setup: Windows 11 Pro 10.0.26200, Ryzen 7 9800X3D, WinLibs GCC 15.2.0 r7, Release,
Whole batch: the full This is one combined tree, not a run of this PR alone. AI-assisted: yes (Claude Code) |
MarcZX10
left a comment
There was a problem hiding this comment.
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.
What
AccessibilityObject::isARIAInputcompared its argument with the role numbers of the wrong WebKit revision.The export is in the 3.20 inventory only.
AccessibilityRoleis 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:CheckBoxRadioButtonSearchFieldSwitchTextFieldSo 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,SVGTextandTreein 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.isARIAControlandariaRoleToWebCoreRoleare in the later inventory and keep the later numbers.isARIAControlused to call theisARIAInputexport; it now calls an internal helper with the same later numbers, so its results are unchanged.Tested
Windows 11, MinGW GCC 15.2.
nkwebkit_accessibilityobjectrolesfails onmain's numbers at the first of the four roles.isARIAInputand against the later list forisARIAControl, plus five values outside the enum, including two whose low byte or low 16 bits are an accepted role.RadioButtonput back to 98, the test fails.nkwebkit_*tests andpatched_librariespass on the branch.python tools/check_conventions.py --base origin/mainandpython tools/debt_fold.py --checkpass.Not tested on a console.
Overlap (
python tools/pr_overlap.py --branch fix/nkwebkit-is-aria-input-legacy-roles):isARIAInput.ariaRoleToWebCoreRolein the same two files. The two branches merge without conflict (git merge-tree), and it does not touchisARIAInput.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)