Skip to content

🎨 Palette: [UX improvement] - Enhance SectionControls with icons and a11y#385

Closed
aafre wants to merge 2 commits into
mainfrom
palette-section-controls-ux-6782404259643635206
Closed

🎨 Palette: [UX improvement] - Enhance SectionControls with icons and a11y#385
aafre wants to merge 2 commits into
mainfrom
palette-section-controls-ux-6782404259643635206

Conversation

@aafre
Copy link
Copy Markdown
Owner

@aafre aafre commented Mar 12, 2026

💡 What: Replaced plain text emojis with SVG icons (MdArrowUpward, MdArrowDownward, MdDeleteOutline) from react-icons/md in SectionControls.tsx. Added aria-label, title, and explicit hover/focus/active states.

🎯 Why: To improve the accessibility, visual consistency, and overall usability of the section controls. The emojis were non-descriptive to screen readers and lacked proper focus indicators for keyboard navigation. The new SVGs align with the application's overall design system.

📸 Before/After: Visual changes apply. (Text Emojis -> React Icons)

♿ Accessibility:

  • Added explicit aria-labels for screen reader support.
  • Added explicit title attributes for tooltips on hover.
  • Added focus-visible styles (focus-visible:ring-2, focus-visible:ring-accent, focus-visible:ring-red-500) to ensure clear focus indication for keyboard users.

PR created automatically by Jules for task 6782404259643635206 started by @aafre

…a11y

Co-authored-by: aafre <8656674+aafre@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the user experience and accessibility of the SectionControls component. By replacing non-descriptive emoji icons with modern SVG icons and integrating comprehensive ARIA attributes and focus styles, the controls are now more visually consistent, intuitive, and fully accessible to users relying on screen readers and keyboard navigation.

Highlights

  • Icon Replacement: Replaced plain text emojis (↑, ↓, 🗑) with react-icons/md SVG icons (MdArrowUpward, MdArrowDownward, MdDeleteOutline) in SectionControls.tsx for visual consistency and improved aesthetics.
  • Accessibility Enhancements: Implemented aria-label for screen readers, title attributes for tooltips, and focus-visible styles for keyboard navigation, significantly improving the accessibility of the section controls.
Changelog
  • .jules/palette.md
    • Created a new markdown file to document UX and accessibility learnings.
  • plan.md
    • Created a new markdown file outlining the planned UX improvements for SectionControls.tsx, including icon replacement and accessibility features.
  • resume-builder-ui/package.json
    • Added @tiptap/core package as a dependency.
  • resume-builder-ui/src/components/SectionControls.tsx
    • Imported React and specific Material Design icons (MdArrowUpward, MdArrowDownward, MdDeleteOutline) from react-icons/md.
    • Added eslint-disable-next-line comments for any type usage in props.
    • Replaced emoji-based buttons (↑, ↓, 🗑) with MdArrowUpward, MdArrowDownward, and MdDeleteOutline SVG icons.
    • Added type="button", aria-label, and title attributes to all control buttons for improved accessibility and tooltips.
    • Updated Tailwind CSS classes for buttons to enhance visual styling, including hover, active, and focus-visible states, and adjusted disabled button appearance.
Activity
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

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 successfully enhances the SectionControls component by replacing emojis with SVG icons and adding accessibility features like aria-label and title. The changes improve the user experience and align with modern web practices. My review includes a few suggestions to further improve code quality by addressing a potentially unused dependency, strengthening type safety, and reducing code duplication.

Comment thread resume-builder-ui/package.json Outdated
"@supabase/supabase-js": "^2.89.0",
"@tanstack/react-query": "^5.90.12",
"@tanstack/react-query-devtools": "^5.91.1",
"@tiptap/core": "^3.20.1",
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 new dependency @tiptap/core does not seem to be used within the scope of this pull request's changes. To keep the application's bundle size and dependencies minimal, please remove this package if it is not required.

Comment on lines +6 to 9
// eslint-disable-next-line @typescript-eslint/no-explicit-any
sections: any[];
// eslint-disable-next-line @typescript-eslint/no-explicit-any
setSections: (sections: any[]) => void;
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

Using any and disabling the linter rule reduces type safety. Since this component doesn't need to know the internal structure of the section items, you can replace any[] with the type-safe unknown[]. This makes the component more robust and maintainable.

Suggested change
// eslint-disable-next-line @typescript-eslint/no-explicit-any
sections: any[];
// eslint-disable-next-line @typescript-eslint/no-explicit-any
setSections: (sections: any[]) => void;
sections: unknown[];
setSections: (sections: unknown[]) => void;

Comment on lines 26 to 53
<button
type="button"
onClick={() => moveSection(sectionIndex, sectionIndex - 1)}
disabled={sectionIndex === 0}
className={`px-2 py-1 rounded ${
aria-label="Move section up"
title="Move section up"
className={`p-2 rounded-lg transition-colors focus-visible:ring-2 focus-visible:ring-accent ${
sectionIndex === 0
? "bg-gray-300 cursor-not-allowed"
: "bg-accent hover:bg-accent text-ink"
? "text-gray-400 bg-gray-100 cursor-not-allowed"
: "text-gray-600 hover:text-accent hover:bg-accent/[0.06] active:bg-accent/[0.1]"
}`}
>
<MdArrowUpward className="text-xl" aria-hidden="true" />
</button>
<button
type="button"
onClick={() => moveSection(sectionIndex, sectionIndex + 1)}
disabled={sectionIndex === sections.length - 1}
className={`px-2 py-1 rounded ${
aria-label="Move section down"
title="Move section down"
className={`p-2 rounded-lg transition-colors focus-visible:ring-2 focus-visible:ring-accent ${
sectionIndex === sections.length - 1
? "bg-gray-300 cursor-not-allowed"
: "bg-accent hover:bg-accent text-ink"
? "text-gray-400 bg-gray-100 cursor-not-allowed"
: "text-gray-600 hover:text-accent hover:bg-accent/[0.06] active:bg-accent/[0.1]"
}`}
>
<MdArrowDownward className="text-xl" aria-hidden="true" />
</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 up and down buttons share a significant amount of Tailwind CSS classes, leading to code duplication. To improve maintainability and ensure consistency, you could extract the common and state-specific classes into variables.

For example:
const baseClasses = "p-2 rounded-lg transition-colors focus-visible:ring-2 focus-visible:ring-accent";
const disabledClasses = "text-gray-400 bg-gray-100 cursor-not-allowed";
const enabledClasses = "text-gray-600 hover:text-accent hover:bg-accent/[0.06] active:bg-accent/[0.1]";

// Then apply them like this:
<button
// ...
className={${baseClasses} ${disabled ? disabledClasses : enabledClasses}}
/>
This would make the styling logic cleaner and easier to manage.

…a11y

Co-authored-by: aafre <8656674+aafre@users.noreply.github.com>
@aafre
Copy link
Copy Markdown
Owner Author

aafre commented Apr 11, 2026

Closing: SectionControls a11y was already merged via #381 (PR #368). See #457 for the consolidated Jules batch-2 PR.

@aafre aafre closed this Apr 11, 2026
@google-labs-jules
Copy link
Copy Markdown
Contributor

Closing: SectionControls a11y was already merged via #381 (PR #368). See #457 for the consolidated Jules batch-2 PR.

Understood. Acknowledging that this work is already merged and stopping work on this task.

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