Skip to content

Conversation

@acicovic
Copy link
Collaborator

@acicovic acicovic commented Jun 19, 2025

Description

With this PR, we're fixing some Content Helper accessibility issues that were reported in #3450 and concern tooling in the Post Editor.

The changes made:

  • We don't use primary buttons anymore. All related buttons have been converted to secondary.
  • All our documentation links now have different text, specifying the feature name (e.g. Learn more about Excerpt Suggestions instead of Learn more about Parse.ly AI).
  • Remove custom blue color in InputRange's InputControlSuffixWrapper (not shown in first screenshot).
  • Almost all controls now have a proper label element. Check here for more details.

@dabowman, this PR has UI implications. See some screenshots for examples, and suggest if we need to adjust anything. Some Learn more about ... texts wrap. We could consider shortening them if we think this is an issue.

image

image

image

image

Motivation and context

How has this been tested?

Manually tested that changes reflect in the UI.

Summary by CodeRabbit

Summary by CodeRabbit

  • Style
    • Updated button styles from "primary" to "secondary" across various panels, including Excerpt Suggestions, Performance Stats, Smart Linking, and Title Suggestions.
    • Applied a destructive style to the "Close" button in the Smart Linking Review Modal.
    • Improved accessibility by linking labels to controls in Persona Selector, Tone Selector, and Input Range components.
    • Refined label styling and CSS class naming for consistency and better semantic structure.
  • New Features
    • Updated link texts to reference specific features (e.g., "Learn more about Excerpt Suggestions," "Learn more about Smart Linking," "Learn more about Title Suggestions") for improved clarity.

@acicovic acicovic added this to the 3.21.0 milestone Jun 19, 2025
@acicovic acicovic self-assigned this Jun 19, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 19, 2025

📝 Walkthrough

Walkthrough

This update modifies user interface text and button styling across several editor sidebar components. Link texts referencing "Parse.ly AI" are replaced with feature-specific labels, and multiple buttons have their variant property changed from "primary" to "secondary." Accessibility improvements are made by associating labels with controls using unique IDs. No underlying logic, event handling, or control flow is affected.

Changes

Files/Groups Change Summary
src/content-helper/editor-sidebar/excerpt-suggestions/component-panel.tsx Updated link text to "Learn more about Excerpt Suggestions"; changed "Generate Excerpt" button to secondary.
src/content-helper/editor-sidebar/performance-stats/component.tsx Changed "View this in Parse.ly" button variant from primary to secondary.
src/content-helper/editor-sidebar/smart-linking/component.tsx Updated link text to "Learn more about Smart Linking"; changed "Generate Smart Links" button to secondary.
src/content-helper/editor-sidebar/smart-linking/review-modal/component-modal.tsx Changed "Close" button to secondary variant and added isDestructive flag.
src/content-helper/editor-sidebar/smart-linking/review-modal/component-suggestion.tsx Changed variant prop syntax for "Reject" and "Remove" buttons to direct string assignment.
src/content-helper/editor-sidebar/title-suggestions/component-title-suggestion.tsx Changed "Replace" button variant from primary to secondary.
src/content-helper/editor-sidebar/title-suggestions/component.tsx Updated link text to "Learn more about Title Suggestions"; changed "Generate Titles" button to secondary.
src/content-helper/common/components/input-range/style.scss Removed CSS rules for margin on label and color on suffix in input control component.
src/content-helper/common/components/input-range/component.tsx Replaced experimental Heading with HTML linked to NumberControl via unique id for accessibility.
src/content-helper/common/components/persona-selector/component.tsx Changed label div to linked to dropdown toggle via unique id for accessibility.
src/content-helper/common/components/tone-selector/component.tsx Changed label div to linked to dropdown toggle via unique id for accessibility.
src/content-helper/common/css/common.scss Renamed CSS class .wp-parsely-dropdown-label to .wp-parsely-editor-sidebar-label; adjusted font-weight and line-height.

Possibly related PRs

  • Parsely/wp-parsely#2928: Updates documentation URLs and error handling in excerpt suggestions, directly related to UI and link changes in the same component.
  • Parsely/wp-parsely#2811: Adds and refactors the excerpt suggestions feature, related by modifying the same components but focused on feature structure.
  • Parsely/wp-parsely#2926: Renames internal comments and class names from "Excerpt Generator" to "Excerpt Suggestions," related by addressing feature naming at a code level.

Assessment against linked issues

Objective Addressed Explanation
Update repeated "Learn more about Parse.ly AI" links to feature-specific labels (e.g., Title Suggestions, Excerpt Suggestions, Smart Linking) (#3450)
Change Tone, Persona, and other labels to semantic <label> elements linked to inputs for accessibility (#3450)
Change all Parse.ly feature buttons from is-primary to secondary except the Publish button (#3450)
Fix "Links" text color and positioning near Smart Linking input to not appear as hyperlink (#3450) No changes observed related to the "Links" text color or positioning near the Smart Linking input.

Assessment against linked issues: Out-of-scope changes

Code Change Explanation
Removal of CSS rules for margin on .parsely-inputrange-control__label and color on .components-input-control__suffix (src/content-helper/common/components/input-range/style.scss) These CSS changes are not directly related to any stated accessibility objectives in #3450.

Suggested labels

Maintenance

Suggested reviewers

  • vaurdan

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

npm error Exit handler never called!
npm error This is an error with npm itself. Please report this error at:
npm error https://github.com/npm/cli/issues
npm error A complete log of this run can be found in: /.npm/_logs/2025-07-03T09_22_56_952Z-debug-0.log


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ef30924 and ad8857e.

⛔ Files ignored due to path filters (3)
  • build/content-helper/dashboard-page.asset.php is excluded by !build/**
  • build/content-helper/editor-sidebar.asset.php is excluded by !build/**
  • build/content-helper/editor-sidebar.js is excluded by !build/**
📒 Files selected for processing (2)
  • src/content-helper/editor-sidebar/performance-stats/component.tsx (1 hunks)
  • src/content-helper/editor-sidebar/smart-linking/component.tsx (2 hunks)
✅ Files skipped from review due to trivial changes (1)
  • src/content-helper/editor-sidebar/smart-linking/component.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/content-helper/editor-sidebar/performance-stats/component.tsx
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: build
  • GitHub Check: E2E against WordPress latest
  • GitHub Check: build
✨ Finishing Touches
  • 📝 Generate Docstrings

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@acicovic acicovic added the Feature: PCI Ticket/PR related to Content Intelligence label Jun 19, 2025
@acicovic acicovic marked this pull request as ready for review June 19, 2025 15:30
@acicovic acicovic requested a review from a team as a code owner June 19, 2025 15:30
@acicovic acicovic mentioned this pull request Jun 19, 2025
4 tasks
@acicovic acicovic modified the milestones: 3.21.0, 3.20.4 Jul 3, 2025
@acicovic acicovic merged commit fe735e0 into develop Jul 3, 2025
33 checks passed
@acicovic acicovic deleted the fix/some-pch-accessibility-issues branch July 3, 2025 09:27
github-actions bot added a commit that referenced this pull request Jul 3, 2025
@acicovic acicovic added the Changelog: Fixed PR to be added under the changelog's "Fixed" section label Jul 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Changelog: Fixed PR to be added under the changelog's "Fixed" section Feature: PCI Ticket/PR related to Content Intelligence

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PCH: Fix accessibility issues

2 participants