Repository navigation
fix(studio): treat region flags as decorative by default - #49574
Conversation
RegionFlag already ships empty alt because it sits beside visible region labels. Default aria-hidden the same way so callers do not have to repeat the decorative treatment.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
5 Skipped Deployments
|
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthrough
ChangesRegionFlag accessibility
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to This localized accessibility change makes region flags decorative by default while preserving their visual rendering. No actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 3 files. Full details: Description checkExplanation The description explains the current behavior, new behavior, affected component, and testing steps. It does not include the required CONTRIBUTING.md confirmation or an explicit Additional context section, but the required change details are mostly complete. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Pull request overview
This PR updates the shared RegionFlag image component in Studio so region flags are treated as decorative by default (empty alt plus aria-hidden), and removes now-redundant a11y props at callsites that display a flag alongside visible region text.
Changes:
- Default
RegionFlagto includearia-hidden(in addition toalt="") so decorative flags aren’t inconsistently announced by assistive technologies. - Remove explicit
aria-hidden/role="presentation"props from region-flag callsites that render next to visible region labels.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| apps/studio/pages/project/[ref]/observability/edge-functions.tsx | Removes redundant aria-hidden on RegionFlag in the region filter option rendering. |
| apps/studio/components/ui/RegionFlag.tsx | Makes RegionFlag decorative-by-default by setting aria-hidden unless overridden. |
| apps/studio/components/interfaces/ProjectCreation/RegionSelector.tsx | Removes redundant role="presentation" from RegionFlag in the selected-region display. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Keep decorative-by-default when alt is empty, but do not hide a flag that a caller has given meaningful alt text.
| className="w-5" | ||
| region={selectedRegion.code} | ||
| /> | ||
| <RegionFlag className="w-5" region={selectedRegion.code} /> |
There was a problem hiding this comment.
Remove role="presentation" from this and the edge functions callsites. It becomes redundant after alt="" and aria-hidden.
🎭 Playwright Test Results (tanstack)Details
Skipped testsFeatures › auth-users.spec.ts › should show web3 users as enabled when the matching web3 provider is enabled |
Braintrust eval reportEvals in progress... ⌛ |
…for-pitr-archiving-stale * origin/master: (26 commits) chore(docs): add Simon Tomlinson to humans.txt (#49547) fix(docs): make code blocks reachable and readable by keyboard and screen reader (#49562) feat: update mgmt api docs (#49128) fix: display request body Array<object> schema/fields in Management API Reference (#49575) Set up feature preview for explorer (#49602) docs(troubleshooting): add postgres_changes not delivering guide (#48997) chore: Update API types (#49598) refactor(studio): fetch MCP tool→FGA map from mgmt-api endpoint (#49225) Add go page: Postgres Summit US 2026 contest (#49597) Add Lingo.dev customer case study (#49595) fix(studio): hide legacy API keys on High Availability projects (#49552) [FE-4246] fix(studio): resolve notebook database labels (#49554) fix(studio): resolve dirty notebook save conflicts (#49540) fix(studio): make menu links reliable (#49584) [FE-3717] feat(studio): Multigres cluster topology diagram (#49298) feat(www): homepage json-ld, canonical, 404 links (#49533) refine role impersonation popover (#49467) feat(studio): move read replica creation to a dialog (#49516) fix(www): pricing table spacing and sticky offset (#49532) fix(studio): treat region flags as decorative by default (#49574) ...
What kind of change does this PR introduce?
Studio accessibility fix.
What is the current behavior?
RegionFlagdefaults toalt="", but only some callsites also passaria-hidden/role="presentation". Decorative flags beside visible region names can still be announced inconsistently.What is the new behavior?
RegionFlagdefaults toaria-hiddenwhenaltis empty, matching how the component is used next to visible region text. Redundant callsite a11y props from #49517 are removed.To test
aria-hiddenon the flagimg.Open the new project flow region selector. Confirm the selected-region flag still renders without role="presentation".
aria-hiddenon the flagimg.