Skip to content

Disambiguate camera picker labels and raise recent files row#6448

Merged
andremion merged 2 commits into
developfrom
fix/compose-attachment-picker-a11y
May 21, 2026
Merged

Disambiguate camera picker labels and raise recent files row#6448
andremion merged 2 commits into
developfrom
fix/compose-attachment-picker-a11y

Conversation

@andremion
Copy link
Copy Markdown
Contributor

@andremion andremion commented May 20, 2026

Goal

Two small TalkBack improvements in the attachment picker surfaced by an accessibility scan:

  1. Camera tab vs body button label collision. Both the tab in the attachment type bar and the call-to-action button inside the camera body used the same string ("Open Camera"), so TalkBack focus moved through "Open Camera, Tab" → "Open Camera, Button". The tab should match the noun convention of the other tabs (Media / Files / Polls); the body button keeps the action wording.
  2. Stream_FindFilesButton row was 47 dp tall. One dp short of the 48 dp minimum interactive component size.

Implementation

  • Renamed stream_compose_attachment_camera_picker from "Open Camera" → "Camera" (and across all 7 locales: es / fr / hi / in / it / ja / ko). The tab references this string and now reads as a noun.
  • Added stream_compose_attachment_camera_picker_cta = "Open Camera" (same translations preserved on the action side). The body button in AttachmentCameraPicker now uses this key, mirroring the existing stream_compose_attachment_poll_picker_cta pattern.
  • Added defaultMinSize(minHeight = LocalMinimumInteractiveComponentSize.current) to the "Recent files" row in FilesPicker.

🎨 UI Changes

The "Recent files" row picks up an extra 1 dp of height (47 → 48 dp). Paparazzi snapshots for FilesPickerTest and AttachmentFilePickerTest rebaselined.

Testing

Enable TalkBack on a physical device, run the Compose sample.

  1. Open a channel and tap the + attachments button.
  2. Swipe through the bottom tab bar — confirm the camera tab announces as "Camera, Tab" (not "Open Camera, Tab").
  3. Select the camera tab. Focus the body call-to-action — confirm it announces as "Open Camera, Button".
  4. Switch to the Files tab. Focus the "Recent files" row at the top — confirm it is a normal-sized tappable target.

Summary by CodeRabbit

  • Bug Fixes

    • File picker "find files" button now enforces minimum interactive height to improve accessibility
  • UI Updates

    • Camera picker button label refactored with "Camera" label separated from "Open Camera" action text for clarity
  • Localization

    • Updated camera picker UI strings across eight languages to match refactored label structure

Review Change Stack

@andremion andremion added the pr:improvement Improvement label May 20, 2026
@andremion
Copy link
Copy Markdown
Contributor Author

@CodeRabbit review

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 20, 2026

PR checklist ✅

All required conditions are satisfied:

  • Title length is OK (or ignored by label).
  • At least one pr: label exists.
  • Sections ### Goal, ### Implementation, and ### Testing are filled (or ignored for dependabot PRs).

🎉 Great job! This PR is ready for review.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 20, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@github-actions
Copy link
Copy Markdown
Contributor

SDK Size Comparison 📏

SDK Before After Difference Status
stream-chat-android-client 5.82 MB 5.82 MB 0.00 MB 🟢
stream-chat-android-ui-components 11.02 MB 11.02 MB 0.00 MB 🟢
stream-chat-android-compose 12.41 MB 12.41 MB 0.00 MB 🟢

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 20, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 68006d53-b8a2-48e2-b04f-ba09aefc6c64

📥 Commits

Reviewing files that changed from the base of the PR and between 45a8985 and 402a954.

⛔ Files ignored due to path filters (4)
  • stream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.components.attachments.files_FilesPickerTest_multiple_selection.png is excluded by !**/*.png
  • stream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.components.attachments.files_FilesPickerTest_single_selection.png is excluded by !**/*.png
  • stream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.messages.attachments_AttachmentFilePickerTest_multiple_selection.png is excluded by !**/*.png
  • stream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.messages.attachments_AttachmentFilePickerTest_single_selection.png is excluded by !**/*.png
📒 Files selected for processing (10)
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/attachments/files/FilesPicker.kt
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/messages/attachments/AttachmentCameraPicker.kt
  • stream-chat-android-compose/src/main/res/values-es/strings.xml
  • stream-chat-android-compose/src/main/res/values-fr/strings.xml
  • stream-chat-android-compose/src/main/res/values-hi/strings.xml
  • stream-chat-android-compose/src/main/res/values-in/strings.xml
  • stream-chat-android-compose/src/main/res/values-it/strings.xml
  • stream-chat-android-compose/src/main/res/values-ja/strings.xml
  • stream-chat-android-compose/src/main/res/values-ko/strings.xml
  • stream-chat-android-compose/src/main/res/values/strings.xml

Walkthrough

Files picker enforces minimum interactive component height via a Compose modifier. Camera picker refactors its label and call-to-action text into separate string resources across nine locales, with the implementation updated to reference the new CTA string key.

Changes

Compose UI Component Refinements

Layer / File(s) Summary
Files picker minimum interactive height
stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/attachments/files/FilesPicker.kt
Adds defaultMinSize(minHeight = LocalMinimumInteractiveComponentSize.current) modifier to the "find files" button row with required Compose layout imports.
Camera picker CTA refactoring and localization
stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/messages/attachments/AttachmentCameraPicker.kt, stream-chat-android-compose/src/main/res/values/strings.xml, stream-chat-android-compose/src/main/res/values-es/strings.xml, stream-chat-android-compose/src/main/res/values-fr/strings.xml, stream-chat-android-compose/src/main/res/values-hi/strings.xml, stream-chat-android-compose/src/main/res/values-in/strings.xml, stream-chat-android-compose/src/main/res/values-it/strings.xml, stream-chat-android-compose/src/main/res/values-ja/strings.xml, stream-chat-android-compose/src/main/res/values-ko/strings.xml
Camera picker button updates to use stream_compose_attachment_camera_picker_cta resource. Across all locales, stream_compose_attachment_camera_picker changes from full action text to a short label, with the action text moved to the new stream_compose_attachment_camera_picker_cta string.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • gpunto

Poem

🐰 A rabbit hops through pickers new,
One height constraint, one string review.
Files stand tall, and cameras call,
Locales aligned—the best of all! 🎨

🚥 Pre-merge checks | ✅ 4 | ❌ 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 (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately captures both key changes: disambiguating camera picker labels and increasing the minimum height of the recent files row.
Description check ✅ Passed The description comprehensively covers goals, implementation details, UI changes, and testing instructions. All required sections are well-documented.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ 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 fix/compose-attachment-picker-a11y

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.

@sonarqubecloud
Copy link
Copy Markdown

@andremion andremion marked this pull request as ready for review May 20, 2026 16:32
@andremion andremion requested a review from a team as a code owner May 20, 2026 16:32
@andremion andremion merged commit 215a66c into develop May 21, 2026
17 of 18 checks passed
@andremion andremion deleted the fix/compose-attachment-picker-a11y branch May 21, 2026 09:45
@stream-public-bot stream-public-bot added the released Included in a release label May 22, 2026
@stream-public-bot
Copy link
Copy Markdown
Contributor

🚀 Available in v7.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:improvement Improvement released Included in a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants