-
Notifications
You must be signed in to change notification settings - Fork 533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix the accessibility issue by adding DialogTitle to DialogContent and making the facility title responsive #10106
Fix the accessibility issue by adding DialogTitle to DialogContent and making the facility title responsive #10106
Conversation
WalkthroughThe pull request introduces an accessibility enhancement to the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (4)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (3)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
✅ Deploy Preview for care-ohc ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/components/ui/sidebar.tsx (1)
211-213
: Consider internationalizing the sidebar title.The accessibility enhancement looks good! However, the hardcoded "Sidebar" text should be moved to the i18n files to support multiple languages.
<VisuallyHidden> - <SheetTitle>Sidebar</SheetTitle> + <SheetTitle>{t('common.sidebar.title')}</SheetTitle> </VisuallyHidden>
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/components/ui/sidebar.tsx
(3 hunks)
🔇 Additional comments (1)
src/components/ui/sidebar.tsx (1)
2-2
: LGTM! Good choice of accessibility components.The addition of Radix UI's
VisuallyHidden
andSheetTitle
components is a solid choice for improving screen reader accessibility.Also applies to: 13-13
…n/care_feAmaan into issues/10031/dialogTitle
There was a problem hiding this 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
🧹 Nitpick comments (2)
src/components/Facility/FacilityHome.tsx (2)
227-232
: Consider adding aria-label to improve accessibilityThe responsive design changes look great! However, since this is an accessibility-focused PR, consider adding an aria-label to the Avatar component when the facility name is truncated to ensure screen readers can access the full name.
<Avatar name={facilityData.name} + aria-label={facilityData.name} className="h-9 w-9 md:h-12 md:w-12 shrink-0 rounded-xl border-2 border-white/10 shadow-xl" />
Line range hint
222-296
: Additional accessibility improvements neededWhile the responsive design changes are excellent, considering this PR's focus on accessibility, consider implementing these additional improvements:
- Add appropriate ARIA landmarks for main content sections
- Ensure proper heading hierarchy throughout the component
- Add keyboard navigation support for interactive elements
- Consider adding skip links for screen readers
Example implementation for landmarks:
-<div className="container mx-auto p-6"> +<main className="container mx-auto p-6" role="main"> <div className="mx-auto max-w-3xl space-y-6"> + <section aria-label={t("facility_information")}> {/* existing content */} + </section> </div> -</div> +</main>
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/components/Facility/FacilityHome.tsx
(2 hunks)
🔇 Additional comments (2)
src/components/Facility/FacilityHome.tsx (2)
222-224
: Great responsive layout improvements!The flex container changes with
flex-wrap
andmin-width-0
effectively prevent content overflow, while responsive gap adjustments ensure consistent spacing across different screen sizes.
296-296
: Good responsive layout for contact information!The switch from column to row layout on larger screens improves content organization and readability.
👋 Hi, @modamaan, This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there. |
LGTM |
@modamaan Your efforts have helped advance digital healthcare and TeleICU systems. 🚀 Thank you for taking the time out to make CARE better. We hope you continue to innovate and contribute; your impact is immense! 🙌 |
Proposed Changes
old
CARE.-.DialogTitleError.2025-01-22.23-36-05.mp4
Updated
CARE.-.DialogTitleSolved.2025-01-22.23-38-19.mp4
@ohcnetwork/care-fe-code-reviewers
Merge Checklist
Summary by CodeRabbit
Accessibility Improvements
User Interface Enhancements
Localization