Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions css/frm_admin.css

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions resources/scss/admin/components/_admin_footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,9 @@ body.frm-hidden-overflow {
.frm-admin-footer-links-socials a {
color: var(--grey-400);
}

/* grey-400 on white is ~2.6:1, below WCAG AA's 4.5:1 -- grey-600 clears it. */
.frm-white-body .frm-admin-footer-links,
.frm-white-body .frm-admin-footer-links-nav a {
color: var(--grey-600);
}
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@
cursor: pointer;
}

/* White text on primary-500 is ~2.9:1, below WCAG AA's 4.5:1 -- primary-700 clears it. */
.frm-review-notice .frm-button-primary {
background-color: var(--primary-700) !important;
border-color: var(--primary-700) !important;
}

.frm-review-notice #frmapi-feedback .frm_button_submit:hover,
.frm-review-notice #frmapi-feedback .frm_button_submit:focus {
color: #fff;
Expand Down
8 changes: 8 additions & 0 deletions resources/scss/admin/layout/top-bar/_navigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,11 @@ ul.frm_form_nav > li {
opacity: 1;
font-weight: 600;
}

/* primary-500 on white is ~2.92:1, below WCAG AA's 4.5:1 -- primary-700 clears it. */
.frm-white-body .frm_form_nav > li a.current_page,
.frm-white-body .post-type-frm_display .frm_form_nav .nav-tab-active,
.frm-white-body .post-type-frm_display .frm_form_nav .nav-tab-active:hover {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Measured --primary-500 (#4199fd) against white directly: 2.917:1, not ~3.07:1 — matches this PR's own verification table (2.92:1) and the footer-nav-link figure, not this comment's number. Doesn't affect the fix (still correctly below 4.5:1, --primary-700 still clears it), just a wrong number in a comment other engineers will read later.

Suggested change
.frm-white-body .post-type-frm_display .frm_form_nav .nav-tab-active:hover {
/* primary-500 on white is ~2.92:1, below WCAG AA's 4.5:1 -- primary-700 clears it. */

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed, applied verbatim.

color: var(--primary-700);
border-color: var(--primary-700);
}
18 changes: 18 additions & 0 deletions tests/cypress/e2e/admin-a11y.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,22 @@ describe( 'Run some accessibility tests', function() {
] );
cy.checkA11y( null, null, logViolations );
} );

// Regression test for issue Strategy11/formidable-pro#6586: color-contrast
// is disabled in baselineRules above, so it's re-enabled here, scoped to
// just the admin footer, to guard the fix without surfacing every other
// pre-existing color-contrast finding on this page.
it( 'Check the admin footer links meet WCAG color-contrast', () => {
cy.visit( '/wp-admin/admin.php?page=formidable' );
cy.injectAxe();
configureAxeWithIgnoredRuleset( [
...baselineRules.filter( rule => rule.id !== 'color-contrast' ),
{ id: 'color-contrast', enabled: true }
] );
// The footer starts `frm_hidden` (display: none) until JS un-hides it;
// axe silently skips hidden nodes for color-contrast, so assert
// visibility first or a regression here would pass vacuously.
cy.get( '.frm-admin-footer-links' ).should( 'be.visible' );
cy.checkA11y( '.frm-admin-footer-links', null, logViolations );
} );
} );
Loading