Skip to content

Updated: review notice UI with improved layout and messaging#1640

Open
SteveJonesDev wants to merge 1 commit intodevelopfrom
steve/no-issue/edac-review-notice
Open

Updated: review notice UI with improved layout and messaging#1640
SteveJonesDev wants to merge 1 commit intodevelopfrom
steve/no-issue/edac-review-notice

Conversation

@SteveJonesDev
Copy link
Copy Markdown
Member

@SteveJonesDev SteveJonesDev commented Apr 21, 2026

This pull request updates the review notice UI in the Accessibility Checker admin area to provide a more visually appealing and accessible experience. The changes include both markup and styling improvements, introducing an icon, clearer messaging, and more modern button styles.

Admin notice UI improvements:

  • Updated the review notice markup in class-admin-notices.php to include an Accessibility Checker icon, simplified message, and reorganized action buttons for leaving a review, reminding later, or dismissing the notice. Button labels and layout were also improved for clarity and accessibility.

Styling enhancements:

  • Refactored the review notice styles in accessibility-checker-admin.scss to use a flexbox layout for better alignment, added styles for the icon, improved spacing, modernized the appearance of action buttons, and introduced new text-link button styles for secondary actions.

Summary by CodeRabbit

  • Style
    • Redesigned the admin review notice with a new layout structure that includes a brand logo, reorganized button navigation, and updated action labels ("Leave a 5-Star Review", "Maybe Later", "No Thanks"). The notice text has been simplified for better readability, and the overall appearance has been refined for improved user interaction.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 21, 2026

📝 Walkthrough

Walkthrough

The admin review notice UI was redesigned with an added logo image, restructured content layout using BEM-style classes, updated button labels and styling, and CSS refactored from grid-based to flex-based layout.

Changes

Cohort / File(s) Summary
Admin Notice Markup
admin/class-admin-notices.php
Updated edac_review_notice() to replace the two-paragraph message with a logo image and structured content container. Button labels changed ("Leave a 5-Star Review", "Maybe Later", "No Thanks") with new CSS classes and a star-rating visual added to the review button.
Styling Updates
src/admin/sass/accessibility-checker-admin.scss
Refactored .edac-review-notice layout from responsive grid to flex-based structure. Added new modifier blocks (logo, content, message, actions) and introduced .edac-review-notice-text-link class for link-styled controls. Removed previous button hover styles.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • PR #846: Modifies the same admin review notice component with overlapping changes to markup and styling.

Suggested labels

codex

Suggested reviewers

  • pattonwebz

Poem

🐰 A notice redesigned with fresh appeal,
With logo and flex, now the layout's real,
Five stars shine bright on a button so sweet,
The admin's review UI now feels complete! ⭐

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main changes in the pull request: a UI update to the review notice with improved layout and messaging changes reflected in both markup and styling files.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch steve/no-issue/edac-review-notice

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the accessibility checker's review notice, updating its HTML structure to include a logo and transitioning the layout to Flexbox. The review feedback highlights a visual regression where the rating stars are no longer styled yellow and suggests enhancing the hover and focus states of the new text-link buttons for better user feedback.

<?php esc_html_e( 'Thanks for using Accessibility Checker. Please consider leaving a review to help others learn about web accessibility.', 'accessibility-checker' ); ?>
</p>
<div class="edac-review-notice-actions">
<button class="edac-review-notice-review button button-primary"><?php esc_html_e( 'Leave a 5-Star Review', 'accessibility-checker' ); ?> <span aria-hidden="true">★★★★★</span></button>
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.

medium

The stars in the review button are no longer styled with the yellow color used in the previous version. This is a visual regression that makes the rating less prominent. Consider adding a specific class to the stars container to restore the yellow styling.

					<button class="edac-review-notice-review button button-primary"><?php esc_html_e( 'Leave a 5-Star Review', 'accessibility-checker' ); ?> <span class="edac-review-notice-stars" aria-hidden="true">★★★★★</span></button>

Comment on lines +1043 to +1044
color: variables.$color-blue;
text-decoration: none;
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.

medium

The hover and focus states for the text-link buttons currently provide minimal visual feedback as the color remains the same and the underline is removed, which can be counter-intuitive for users. Additionally, the color property is redundant here. Consider using an opacity change or a different color to improve the interactive experience.

Suggested change
color: variables.$color-blue;
text-decoration: none;
opacity: 0.7;
text-decoration: none;

text-decoration: none;
}
}
}
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.

medium

Add styling for the stars to restore the yellow color and provide proper spacing, matching the previous design's intent.

  &-stars {
    color: variables.$color-yellow;
    margin-left: 4px;
  }
}

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
src/admin/sass/accessibility-checker-admin.scss (1)

1032-1045: Add an explicit keyboard focus-visible style for text-link buttons.

These controls are critical actions; defining :focus-visible explicitly will make keyboard focus more reliable and obvious.

💡 Suggested refinement
   &-text-link {
     background: none;
     border: none;
     padding: 0;
     color: variables.$color-blue;
     text-decoration: underline;
     font-size: 13px;
     cursor: pointer;

     &:hover,
-    &:focus {
+    &:focus {
       color: variables.$color-blue;
       text-decoration: none;
     }
+
+    &:focus-visible {
+      outline: 2px solid variables.$color-blue;
+      outline-offset: 2px;
+      text-decoration: underline;
+    }
   }

Based on learnings: Test accessibility changes with screen readers (NVDA, JAWS, VoiceOver) and axe-core to verify WCAG compliance.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/admin/sass/accessibility-checker-admin.scss` around lines 1032 - 1045,
The .-text-link button lacks an explicit :focus-visible rule, so keyboard users
may not see a clear focus indicator; add a :focus-visible selector for the
&-text-link block (alongside existing &:hover and &:focus) that sets a visible,
high-contrast outline or box-shadow and preserves background/foreground colors
(e.g., 2px solid or 3px ring using variables.$color-blue or a contrast-safe
variable), ensure outline-offset and border-radius match the button shape, and
keep text-decoration consistent; update the &-text-link rule in
src/admin/sass/accessibility-checker-admin.scss so keyboard focus uses
:focus-visible for reliable, accessible focus styling.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@admin/class-admin-notices.php`:
- Around line 325-327: The three notice action buttons rendered in
admin/class-admin-notices.php (the elements with classes
edac-review-notice-review, edac-review-notice-remind, and
edac-review-notice-dismiss) lack an explicit type attribute; add type="button"
to each button element so they are semantically correct and won't act as
accidental form submitters when JavaScript click handlers are used.

---

Nitpick comments:
In `@src/admin/sass/accessibility-checker-admin.scss`:
- Around line 1032-1045: The .-text-link button lacks an explicit :focus-visible
rule, so keyboard users may not see a clear focus indicator; add a
:focus-visible selector for the &-text-link block (alongside existing &:hover
and &:focus) that sets a visible, high-contrast outline or box-shadow and
preserves background/foreground colors (e.g., 2px solid or 3px ring using
variables.$color-blue or a contrast-safe variable), ensure outline-offset and
border-radius match the button shape, and keep text-decoration consistent;
update the &-text-link rule in src/admin/sass/accessibility-checker-admin.scss
so keyboard focus uses :focus-visible for reliable, accessible focus styling.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 9bc67773-7fcc-47f7-815a-73125fe292d2

📥 Commits

Reviewing files that changed from the base of the PR and between 563a659 and af25b6f.

📒 Files selected for processing (2)
  • admin/class-admin-notices.php
  • src/admin/sass/accessibility-checker-admin.scss

Comment thread admin/class-admin-notices.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant