A11y: distinct aria-label for duplicate form landmarks (aria_landmark_name_unique) - #3367
vivi-the-going-merry[bot] wants to merge 4 commits into
Conversation
The Styles edit page renders two <form> elements (style settings, live preview) and the Import/Export page renders two more (Import, Export) - all four shared no accessible name, tripping the IBM Equal Access aria_landmark_name_unique rule. Give each a distinct aria-label. Closes Strategy11/formidable-pro#6695
Both new tests asserted the same thing (distinct, non-empty aria-label per <form>) with duplicated regex/assertion logic.
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
|
Overall Grade |
Security Reliability Complexity Hygiene |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| PHP | Sep 17, 2026 9:50p.m. | Review ↗ | |
| JavaScript | Sep 17, 2026 9:50p.m. | Review ↗ |
Important
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
…ist view render_style_page() reads $_GET (form/style_id) to pick 'edit' vs 'list'; a leftover value from another test would silently render the list view's single form instead, making this fail for the wrong reason.
What was broken
Two admin pages each render two
<form>elements with no accessible name, so screen reader users can't tell them apart when jumping between landmarks (IBM Equal Access rulearia_landmark_name_unique):?page=formidable-styles): the style settings form and the live style preview form.?page=formidable-import): the Import form and the Export form.Confirmed against a real CI run's IBM checker log: exactly these 4 violations, 2 per page.
The same 4
<form>elements also each need a unique accessible label, not just any label (IBM rulearia_form_label_unique) — the fix below covers both rules on the same lines, confirmed by re-running the IBM checker post-fix.What changed
Added a distinct
aria-labelto each form:add_filter/remove_filterpair on the existingfrm_form_attributeshook (same mechanismFrmAntiSpamalready uses), not a change to the shared front-end template.Markup/PHP only — no CSS or JS changes.
How it was verified
Added PHPUnit tests (
tests/phpunit/styles/test_FrmStylesController.php,tests/phpunit/xml/test_FrmXMLController.php) that render the real markup and assert each page's two<form>tags have distinct, non-emptyaria-labelvalues. Confirmed red before the fix (empty accessible name) and green after, against the real local PHPUnit rig. PHPCS clean. Self-reviewed (3 parallel lenses: correctness, security, simplify) — extracted the duplicated assertion logic into a sharedFrmUnitTest::assert_form_landmarks_have_unique_names()helper.CI's own E2E run (
checkIbmAccessibilityagainst every admin page) confirms zeroaria_landmark_name_uniqueand zeroaria_form_label_uniqueviolations on this branch.Closes Strategy11/formidable-pro#6695
Closes Strategy11/formidable-pro#6697
🤖 Generated with Claude Code