Fix invalid aria-selected on payment settings tab label - #3373
Conversation
The <label> toggling each payment gateway section sits inside a role="tablist" container but carried aria-selected with no role of its own — invalid per WAI-ARIA (aria-selected is only valid on option/tab/row/gridcell/treeitem/columnheader/rowheader). Add role="tab" so the attribute is valid for its element. Fixes Strategy11/formidable-pro#6701
|
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 18, 2026 12:17a.m. | Review ↗ | |
| JavaScript | Sep 18, 2026 12:17a.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.
What was broken
IBM Equal Access's
aria_attribute_validrule flagged a violation in the Cypress a11y run (tests/cypress/e2e/admin-a11y.cy.js,formidable-settingspage). The CI log only records rule id/level/message, not a selector, so this was traced statically:classes/views/frm-settings/payments.php's payment-gateway tab<label>sits inside arole="tablist"container but carriesaria-selectedwith no role of its own.aria-selectedis only valid onoption/tab/row/gridcell/treeitem/columnheader/rowheader— a bare<label>has no implicit ARIA role, so the attribute was invalid on it.What changed
Added
role="tab"to the label's attributes, matching the semantic intent (it's a clickable tab inside atablist) and makingaria-selectedvalid on the element that carries it.How it was verified
Markup-only, single attribute addition — no CSS/JS change. Traced statically to the single element on the tested pages pairing an explicit
rolewith a mismatchedaria-*attribute; everything else co-occurring on the spec's target pages (dashboard, form list, entries, styles, applications, templates, import, settings, addons, smtp, trash) was already spec-valid. This PR's own CI run (admin-a11y.cy.jsagainstformidable-settings) is the self-test for the fix.Closes Strategy11/formidable-pro#6701