Skip to content

🎨 Palette: Add missing ARIA labels to copy buttons in admin dialog#244

Open
ldsgroups225 wants to merge 1 commit intomasterfrom
palette-a11y-copy-buttons-16038112012506419627
Open

🎨 Palette: Add missing ARIA labels to copy buttons in admin dialog#244
ldsgroups225 wants to merge 1 commit intomasterfrom
palette-a11y-copy-buttons-16038112012506419627

Conversation

@ldsgroups225
Copy link
Copy Markdown
Owner

@ldsgroups225 ldsgroups225 commented Apr 3, 2026

💡 What: Added title and aria-label attributes to the "copy to clipboard" icon-only buttons in the create admin dialog.
🎯 Why: Without these attributes, screen readers only announce "button" with no context, and sighted users have no tooltip to explain the icon's purpose. This resolves a significant accessibility barrier and improves general usability.
📸 Before/After: Before: <Button size="icon"><IconCopy /></Button>, After: <Button size="icon" title="Copier l'email" aria-label="Copier l'email"><IconCopy /></Button>
♿ Accessibility: Ensures that screen readers can correctly announce the copy actions for both email and password fields.


PR created automatically by Jules for task 16038112012506419627 started by @ldsgroups225

Summary by CodeRabbit

  • Bug Fixes
    • Improved accessibility for credential copy buttons. Email and password copy buttons in the admin account creation flow now include descriptive labels for screen readers and tooltip text, making icon-only buttons more accessible and intuitive for all users.

@google-labs-jules
Copy link
Copy Markdown

👋 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.

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 3, 2026

📝 Walkthrough

Walkthrough

Added accessibility attributes (title and aria-label) to two credential copy icon buttons in the create admin dialog component, with localized French text for email and password copy actions. Documentation updated to reflect these accessibility enhancements.

Changes

Cohort / File(s) Summary
Accessibility Enhancement
apps/core/src/components/schools/create-admin-dialog.tsx
Added title and aria-label attributes to email and password copy buttons with French localized text ("Copier l'email" and "Copier le mot de passe") for improved accessibility and tooltip display.
Documentation Update
pr_body.txt
Updated PR description documenting the accessibility enhancement with before/after button markup and context on localized title and aria-label attributes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 With whiskers twitching, I hop with cheer,
Those buttons now speak, crystal clear!
Email and password, labeled with care,
Accessibility magic floats through the air! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: adding ARIA labels to copy buttons in the admin dialog. It accurately reflects the accessibility enhancement made in the changeset.

✏️ 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 palette-a11y-copy-buttons-16038112012506419627

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

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

Copy link
Copy Markdown

@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: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/core/src/components/schools/create-admin-dialog.tsx`:
- Around line 270-271: The title and aria-label in the Copy Password button are
hardcoded French strings; replace them with the typesafe-i18n lookup (e.g.,
LL.schools.admin.copyPassword()) in the CreateAdminDialog component so both
attributes use i18n instead of literals, and add the corresponding key
("schools.admin.copyPassword") to your locale JSON files; locate the attributes
on the element in create-admin-dialog.tsx and swap the literal "Copier le mot de
passe" for the LL lookup.
- Around line 241-242: The title and aria-label for the email copy button are
hardcoded in the CreateAdminDialog JSX; replace both hardcoded French strings
with the typesafe-i18n lookup (e.g., call LL.schools.admin.copyEmail() or the
appropriate LL key used across the app) inside the element attributes so both
title and aria-label use the i18n function, and add the corresponding
"schools.admin.copyEmail" entry to your i18n JSON files (e.g., fr/index.json)
with the French translation.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: ee9dd87e-2a58-4acc-a61b-3796269fa00c

📥 Commits

Reviewing files that changed from the base of the PR and between 7e37ef8 and 588ca09.

📒 Files selected for processing (2)
  • apps/core/src/components/schools/create-admin-dialog.tsx
  • pr_body.txt

Comment on lines +241 to +242
title="Copier l'email"
aria-label="Copier l'email"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Replace hardcoded French string with i18n function.

The title and aria-label attributes contain hardcoded French text. As per coding guidelines, all UI text in JSX must use i18n functions via LL.key() instead of hardcoded strings.

🌐 Recommended pattern using typesafe-i18n

Assuming you add the appropriate key to your i18n translation files, the implementation should look like:

                        <Button
                          type="button"
                          variant="outline"
                          size="icon"
-                          title="Copier l'email"
-                          aria-label="Copier l'email"
+                          title={LL.schools.admin.copyEmail()}
+                          aria-label={LL.schools.admin.copyEmail()}
                          onClick={() =>
                            copyToClipboard(credentials.email, 'email')}
                        >

You'll need to add the corresponding key to your i18n JSON files (e.g., fr/index.json):

{
  "schools": {
    "admin": {
      "copyEmail": "Copier l'email"
    }
  }
}

As per coding guidelines: "All UI text in JSX must use i18n functions — never hardcode French strings directly in components" and "Always use LL.key() for UI strings via typesafe-i18n instead of hardcoding strings".

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
title="Copier l'email"
aria-label="Copier l'email"
title={LL.schools.admin.copyEmail()}
aria-label={LL.schools.admin.copyEmail()}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/core/src/components/schools/create-admin-dialog.tsx` around lines 241 -
242, The title and aria-label for the email copy button are hardcoded in the
CreateAdminDialog JSX; replace both hardcoded French strings with the
typesafe-i18n lookup (e.g., call LL.schools.admin.copyEmail() or the appropriate
LL key used across the app) inside the element attributes so both title and
aria-label use the i18n function, and add the corresponding
"schools.admin.copyEmail" entry to your i18n JSON files (e.g., fr/index.json)
with the French translation.

Comment on lines +270 to +271
title="Copier le mot de passe"
aria-label="Copier le mot de passe"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Replace hardcoded French string with i18n function.

The title and aria-label attributes contain hardcoded French text. As per coding guidelines, all UI text in JSX must use i18n functions via LL.key() instead of hardcoded strings.

🌐 Recommended pattern using typesafe-i18n

Assuming you add the appropriate key to your i18n translation files, the implementation should look like:

                        <Button
                          type="button"
                          variant="outline"
                          size="icon"
-                          title="Copier le mot de passe"
-                          aria-label="Copier le mot de passe"
+                          title={LL.schools.admin.copyPassword()}
+                          aria-label={LL.schools.admin.copyPassword()}
                          onClick={() =>
                            copyToClipboard(credentials.password, 'password')}
                        >

You'll need to add the corresponding key to your i18n JSON files (e.g., fr/index.json):

{
  "schools": {
    "admin": {
      "copyPassword": "Copier le mot de passe"
    }
  }
}

As per coding guidelines: "All UI text in JSX must use i18n functions — never hardcode French strings directly in components" and "Always use LL.key() for UI strings via typesafe-i18n instead of hardcoding strings".

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

In `@apps/core/src/components/schools/create-admin-dialog.tsx` around lines 270 -
271, The title and aria-label in the Copy Password button are hardcoded French
strings; replace them with the typesafe-i18n lookup (e.g.,
LL.schools.admin.copyPassword()) in the CreateAdminDialog component so both
attributes use i18n instead of literals, and add the corresponding key
("schools.admin.copyPassword") to your locale JSON files; locate the attributes
on the element in create-admin-dialog.tsx and swap the literal "Copier le mot de
passe" for the LL lookup.

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