Skip to content

MM-395: Improve Dashboard Top Account List Accessibility#3113

Merged
niyajali merged 14 commits intoopenMF:developmentfrom
himanshurajputk123:feature/MM-395-dashboard-accessibility
Mar 14, 2026
Merged

MM-395: Improve Dashboard Top Account List Accessibility#3113
niyajali merged 14 commits intoopenMF:developmentfrom
himanshurajputk123:feature/MM-395-dashboard-accessibility

Conversation

@himanshurajputk123
Copy link
Copy Markdown
Contributor

@himanshurajputk123 himanshurajputk123 commented Feb 14, 2026

Description

This PR improves accessibility and empty state handling for the Dashboard top account section.

Changes Made:

  • Improved empty state messaging
  • Moved hardcoded string to string resources
  • Enhanced accessibility using semantic roles
  • Ensured better screen reader compatibility
  • Improved contrast for dashboard card text

Issue

MM-395

Screenshots / Testing

  • Verified with TalkBack
  • Verified keyboard navigation
  • Spotless & Detekt passed

📸 Screenshots
Before Changes->

Due to the size and complexity of the project, I encountered technical issues while attempting to switch back to the base branch and run the application to capture the “before” screenshots. Despite spending considerable time troubleshooting, I was unable to successfully generate them.
I sincerely apologize for not being able to provide the “before” screenshots and appreciate your understanding.

After Changes->
Below is the screenshot reflecting the implemented accessibility improvements:
Screenshot 2026-02-16 094432

Summary by CodeRabbit

  • Improvements
    • Enhanced accessibility with semantic descriptions and focus controls on dashboard cards and home screen (includes heading semantics for greeting)
    • Improved contrast for loan and savings amounts
    • Updated application button labels for loan, savings, and share accounts
    • Added a helpful message when no active accounts exist and adjusted its layout
    • Added "Notifications" and "Toggle Visibility" labels for better screen reader support

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 14, 2026

📝 Walkthrough

Walkthrough

Introduces accessibility semantics and content-description strings to dashboard and home UIs, updates several home string labels, and adds two dashboard string resources. Also introduces unresolved Git merge conflict markers at the end of cmp-shared/cmp_shared.podspec that must be resolved.

Changes

Cohort / File(s) Summary
Dashboard UI & resources
core/ui/src/commonMain/kotlin/org/mifos/mobile/core/ui/component/MifosDashboardCard.kt, core/ui/src/commonMain/composeResources/values/strings.xml
Added focusable() and semantics(...) to dashboard card, created totalDescription using new dashboard_totals string, increased loan/savings text opacity, and added dashboard_toggle_visibility string resource used for the visibility toggle.
Home screen UI & resources
feature/home/src/commonMain/kotlin/org/mifos/mobile/feature/home/HomeScreen.kt, feature/home/src/commonMain/composeResources/values/strings.xml
Replaced/updated several home string keys and values (apply_for_*, added notifications, added feature_home_no_active_accounts, removed feature_home_greet), added heading semantics to greeting, changed alert Image contentDescription to notifications string, updated no-active-accounts flow to show centered message then apply dashboard, and changed ServiceItemCard clickable -> clippedClickable with Button role semantics.
Podspec (merge conflict introduced)
cmp-shared/cmp_shared.podspec
File now contains unresolved Git merge conflict markers (duplicated EOF/end lines with HEAD/branch markers). File is syntactically invalid until conflict is resolved.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • niyajali
  • amanna13
  • Nagarjuna0033

Poem

🐰
Little paws tapped a semantic tune,
Cards now whisper totals to the moon,
Bad markers hid where podspecs sleep,
Hop—fix the conflict, tidy the heap,
I nibble strings and make UIs bloom 🌷

🚥 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 summarizes the main change: improving dashboard accessibility, which aligns with the PR's primary objectives of enhanced semantics, screen reader support, and accessibility improvements across multiple files.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


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
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: 5

🤖 Fix all issues with AI agents
In `@cmp-shared/cmp_shared.podspec`:
- Line 53: The podspec uses Windows backslashes in the resource path which
breaks CocoaPods on macOS/Linux; update spec.resources (the array entry
currently 'build\compose\cocoapods\compose-resources') to use POSIX forward
slashes ('build/compose/cocoapods/compose-resources') so CocoaPods can resolve
compose-resources correctly.

In
`@core/ui/src/commonMain/kotlin/org/mifos/mobile/core/ui/component/MifosDashboardCard.kt`:
- Line 85: The Box in MifosDashboardCard is assigned Role.Button but has no
clickable modifier; either make the card actually clickable by adding a
clickable Modifier and wiring an onClick handler (expose an onClick lambda on
MifosDashboardCard and apply Modifier.clickable within the Box), or
remove/change the semantic role to a non-actionable role (e.g.,
Role.Image/Role.Group or omit Role) so assistive tech is not misled; update the
Box semantics accordingly.
- Around line 83-89: The current use of clearAndSetSemantics inside
MifosDashboardCard (the modifier chain that includes
.focusable().clearAndSetSemantics { ... }) removes descendant semantics and
makes the eye IconButton (the visibility toggle) inaccessible; replace
clearAndSetSemantics with semantics(mergeDescendants = true) while preserving
the role and contentDescription logic so children remain actionable and the
descriptive text still applies to the combined node; update the modifier on the
dashboard card (the block that sets role = Role.Button and contentDescription
for totals) to use semantics(mergeDescendants = true) and keep focusable() so
the IconButton at lines ~165-176 remains reachable by screen readers and
keyboard.
- Around line 86-88: The contentDescription in MifosDashboardCard.kt currently
embeds hardcoded English text; replace the concatenated literal with a localized
stringResource call (e.g., stringResource(R.string.dashboard_totals, loanAmount
?: "zero", currency ?: "", savingsAmount ?: "zero", currency ?: "")) and add
corresponding string resource(s) with placeholders for loan amount, currency and
savings amount; update the contentDescription assignment in the
MifosDashboardCard composable to use stringResource(...) instead of the
hardcoded sentence.

In
`@feature/home/src/commonMain/kotlin/org/mifos/mobile/feature/home/HomeScreen.kt`:
- Line 143: Replace the hardcoded contentDescription = "Notifications" in
HomeScreen (the Icon/IconButton that sets contentDescription) with a
stringResource lookup; add an entry like "notifications" to strings.xml and use
contentDescription = stringResource(R.string.notifications) and import
androidx.compose.ui.res.stringResource so the composable uses the localized
resource instead of a hardcoded English string.
🧹 Nitpick comments (1)
core/ui/src/commonMain/kotlin/org/mifos/mobile/core/ui/component/MifosDashboardCard.kt (1)

84-89: Inconsistent indentation inside clearAndSetSemantics block.

contentDescription is indented to a different level than role. Also, the opening brace style is inconsistent (no space before {).

🧹 Formatting fix
-            .focusable()
-                .clearAndSetSemantics{
-                    role = Role.Button
-                contentDescription =
-                    "Total loan ${loanAmount ?: "zero"} ${currency ?: ""}." +
-                    "Total savings ${savingsAmount ?: "zero"} ${currency ?: ""}."
-            }
+            .focusable()
+            .clearAndSetSemantics {
+                role = Role.Button
+                contentDescription =
+                    "Total loan ${loanAmount ?: "zero"} ${currency ?: ""}. " +
+                    "Total savings ${savingsAmount ?: "zero"} ${currency ?: ""}."
+            }

Comment thread cmp-shared/cmp_shared.podspec Outdated
Comment thread feature/home/src/commonMain/kotlin/org/mifos/mobile/feature/home/HomeScreen.kt Outdated
@amanna13
Copy link
Copy Markdown
Member

@himanshurajputk123 Welcome to the Mifos community ! If you are looking to contribute to Mifos projects, then have a look into the onboarding guide https://mifosforge.jira.com/wiki/spaces/MP/pages/4537024513/Welcome+to+the+Mifos+Mobile+Apps+Community . You can join the slack channel and signup for daily standups. Link for the same are mentioned in the link.

As per this PR, it seems that the ticket is not yet assigned to you. you can ask for it in the respective channel.

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

🤖 Fix all issues with AI agents
In `@feature/home/src/commonMain/composeResources/values/strings.xml`:
- Line 57: Update the string resource named feature_home_no_active_accounts to
use the plural form "accounts" instead of "account" so the message reads "You
don't have any active accounts yet."; locate the <string
name="feature_home_no_active_accounts"> entry and change its text accordingly to
preserve grammatical correctness across the UI.
🧹 Nitpick comments (1)
feature/home/src/commonMain/kotlin/org/mifos/mobile/feature/home/HomeScreen.kt (1)

210-223: Consider adding fillMaxWidth() to the empty-state Column.

The centering currently works because MifosAccountApplyDashboard internally fills the width. Adding fillMaxWidth() on this Column makes the intent explicit and guards against future changes to the inner component's layout.

♻️ Suggested improvement
                     } else {
                         Column(
+                            modifier = Modifier.fillMaxWidth(),
                             horizontalAlignment = Alignment.CenterHorizontally,
                         ) {

Comment thread feature/home/src/commonMain/composeResources/values/strings.xml Outdated
@Nagarjuna0033
Copy link
Copy Markdown
Contributor

@himanshurajputk123 If there are ui changes upload before and after and resolve coderabbitai changes

@himanshurajputk123
Copy link
Copy Markdown
Contributor Author

@Nagarjuna0033 Sure sir i'm working on it.

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.

🧹 Nitpick comments (3)
core/ui/src/commonMain/composeResources/values/strings.xml (1)

134-134: Currency/amount ordering may read awkwardly for prefix-symbol currencies.

The format "Total loan %1$s %2$s" produces e.g. "Total loan 900.00 $" for prefix-symbol currencies like $ or , which is unnatural for screen readers. Consider swapping to %2$s %1$s (currency before amount), or better yet, formatting the amount with its currency symbol upstream and passing a single pre-formatted string.

core/ui/src/commonMain/kotlin/org/mifos/mobile/core/ui/component/MifosDashboardCard.kt (1)

147-147: Remove commented-out code.

The commented-out color = KptTheme.colorScheme.secondary is dead code that adds noise.

🧹 Suggested cleanup
-//                            color = KptTheme.colorScheme.secondary,
feature/home/src/commonMain/kotlin/org/mifos/mobile/feature/home/HomeScreen.kt (1)

211-224: Empty-state implementation looks clean.

The centered message with the apply-dashboard widget below provides a clear call-to-action when no accounts exist. One small note: the fillMaxWidth() modifier is missing on the wrapping Column, so on wider screens the column may not center as expected within the parent.

💡 Consider adding fillMaxWidth for consistent centering
                     Column(
+                        modifier = Modifier.fillMaxWidth(),
                         horizontalAlignment = Alignment.CenterHorizontally,
                     ) {

@himanshurajputk123
Copy link
Copy Markdown
Contributor Author

@coderabbitai resume

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 16, 2026

✅ Actions performed

Reviews resumed.

Comment thread gradle/libs.versions.toml Outdated
Comment thread gradle/wrapper/gradle-wrapper.properties Outdated
@himanshurajputk123
Copy link
Copy Markdown
Contributor Author

Can anyone tell me what to do next with this PR?
Ticket wasn't assigned to me and i wasn't aware of the fact that i must wait for assigned ticket then only i can open PR.
As a newcomer, as a first year contributor please guide me.

@himanshurajputk123
Copy link
Copy Markdown
Contributor Author

Hi @niyajali ,
Thank you for the review.
I can see "Changes requested" but I’m unable to locate the specific comments.
Could you please point me to them?

@niyajali
Copy link
Copy Markdown
Collaborator

@himanshurajputk123 you marked as resolved

Comment thread cmp-shared/cmp_shared.podspec Outdated
niyajali
niyajali previously approved these changes Feb 24, 2026
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

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

Inline comments:
In `@cmp-shared/cmp_shared.podspec`:
- Around line 54-58: Remove the unresolved Git conflict markers (`<<<<<<< HEAD`,
`=======`, `>>>>>>> 45ba382e`) from the podspec and ensure the Ruby `end` token
remains once (i.e., the file should not contain any conflict delimiters); open
the cmp_shared.podspec content around where those markers appear, choose the
correct block to keep (most likely the single trailing `end`), delete the other
duplicated/conflict lines, and run a quick `pod spec lint` or `ruby -c` to
verify the podspec parses cleanly.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3e616ab and 9ca51d5.

📒 Files selected for processing (1)
  • cmp-shared/cmp_shared.podspec

Comment thread cmp-shared/cmp_shared.podspec Outdated
@himanshurajputk123 himanshurajputk123 force-pushed the feature/MM-395-dashboard-accessibility branch from 9ca51d5 to 68572f9 Compare February 25, 2026 19:26
@therajanmaurya therajanmaurya requested a review from a team March 5, 2026 17:51
@niyajali
Copy link
Copy Markdown
Collaborator

niyajali commented Mar 6, 2026

@himanshurajputk123 There's no Jira ticket for this PR, consider creating one first and ask maintainers to assign it to you before working or sending a pull request, @biplab1 could you create a Jira Ticket for this

@himanshurajputk123
Copy link
Copy Markdown
Contributor Author

@himanshurajputk123 There's no Jira ticket for this PR, consider creating one first and ask maintainers to assign it to you before working or sending a pull request, @biplab1 could you create a Jira Ticket for this

Thank you Sir for the clarification. I’ll make sure to create or get assigned a Jira ticket before starting work on a PR next time.
For this PR, I’ll wait for the Jira ticket to be created and will update the PR description accordingly once it's available.

@niyajali niyajali merged commit 9526956 into openMF:development Mar 14, 2026
2 checks passed
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.

5 participants