Skip to content

♿ app: compose limits as text for accessibility#905

Merged
cruzdanilo merged 1 commit intomainfrom
hotfix
Mar 20, 2026
Merged

♿ app: compose limits as text for accessibility#905
cruzdanilo merged 1 commit intomainfrom
hotfix

Conversation

@dieguezguille
Copy link
Member

@dieguezguille dieguezguille commented Mar 20, 2026


Open with Devin

Summary by CodeRabbit

  • Accessibility Improvements

    • Enhanced accessibility labels for spending and credit limit value displays to provide better screen reader support.
  • Display & Localization

    • Spending and credit limit values now feature improved currency formatting with proper localization support. Sensitive content display has been updated to respect user privacy preferences.

@dieguezguille dieguezguille self-assigned this Mar 20, 2026
@dieguezguille dieguezguille requested a review from franm91 as a code owner March 20, 2026 20:53
@changeset-bot
Copy link

changeset-bot bot commented Mar 20, 2026

⚠️ No Changeset found

Latest commit: 2f1561b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@gemini-code-assist
Copy link

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 focuses on improving the accessibility and privacy of financial limit displays within the application. It refactors the presentation of spending and credit limits to ensure they are properly formatted and announced by screen readers, while also introducing a feature to obscure these sensitive financial details when a user's privacy settings dictate.

Highlights

  • Accessibility Improvements: Enhanced the accessibility of spending and credit limit displays by pre-composing the numerical values into localized text strings and utilizing aria-label attributes for screen readers.
  • Sensitive Data Handling: Implemented logic to conditionally hide sensitive financial limit data, displaying '***' instead of the actual amount when a 'sensitive' setting is enabled, improving user privacy.
  • Code Refactoring: Refactored the display components for spending and credit limits to use the newly formatted text strings, simplifying the rendering logic and improving maintainability.
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.

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.

@coderabbitai
Copy link

coderabbitai bot commented Mar 20, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: c69a978e-2d1e-41d2-8c0a-48f6fafde8da

📥 Commits

Reviewing files that changed from the base of the PR and between d4d9a8f and 2f1561b.

📒 Files selected for processing (1)
  • src/components/home/CardStatus.tsx

Walkthrough

CardStatus component modified to integrate sensitive settings query, precompute spending and credit display strings with localized formatting, and update accessibility labeling and markup structure accordingly.

Changes

Cohort / File(s) Summary
Sensitive Settings Integration & Refactoring
src/components/home/CardStatus.tsx
Added useQuery<boolean> hook to fetch ["settings","sensitive"] for conditional value masking. Precomputed localized currency strings (spending, credit) with fixed 2-decimal formatting. Updated aria-label accessibility to display "***" when sensitive settings are enabled, otherwise show formatted dollar amounts. Removed intermediate XStack wrappers and simplified markup structure.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 2
✅ 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 accurately reflects the main change: improving accessibility by composing limit displays as text, which aligns with the changes to aria-labeling and text composition in CardStatus.tsx.

✏️ 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 hotfix

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

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

View 1 additional finding in Devin Review.

Open in Devin Review

Comment on lines 308 to 309
})}
</Text>

Choose a reason for hiding this comment

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

🚩 Collateral text lacks hidden-aware aria-label unlike the other values

The collateral text at src/components/home/CardStatus.tsx:305 has the sensitive prop (so it visually hides with ***), but unlike the newly fixed spending limit and credit limit values, it does not have a hidden-aware aria-label. This means screen readers will still read the collateral value even when the sensitive setting is enabled. This is a pre-existing inconsistency that this PR does not address — the PR only fixes the spending and credit limit accessibility labels. Whether the collateral line needs the same treatment depends on product requirements.

(Refers to lines 305-309)

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link

@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 improves accessibility by refactoring how spending and credit limits are rendered, making them more screen-reader friendly. The changes are well-implemented. I've added one suggestion to reduce code duplication for better maintainability.

@sentry
Copy link

sentry bot commented Mar 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.54%. Comparing base (d4d9a8f) to head (2f1561b).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #905       +/-   ##
===========================================
+ Coverage   48.28%   71.54%   +23.26%     
===========================================
  Files         204      220       +16     
  Lines        7143     7967      +824     
  Branches     2409     2545      +136     
===========================================
+ Hits         3449     5700     +2251     
+ Misses       3551     2040     -1511     
- Partials      143      227       +84     
Flag Coverage Δ
e2e 51.86% <100.00%> (+3.58%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cruzdanilo cruzdanilo merged commit 2f1561b into main Mar 20, 2026
12 of 14 checks passed
@cruzdanilo cruzdanilo deleted the hotfix branch March 20, 2026 21:27
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.

2 participants