Fix(#296): accessibility issues and add test tags to UI elements (#309)

This commit addresses the accessibility issues described in Issue 296:
1. Replaced `pointerInput` gestures with `combinedClickable(role = Role.Button)` in `ChatBubble.kt` and `ChatScreen.kt` to ensure screen readers announce interactive text elements and chat bubbles correctly.
2. Added `role = Role.Button` to the clickable modifiers in `SessionsScreen.kt`.
3. Introduced proper `testTag` modifiers throughout interactive components like `session_card`, `chat_bubble_user`, `chat_bubble_assistant`, and `clarify_option` to facilitate UI testing.
This commit is contained in:
M57 authored and GitHub committed 2026-06-22 21:36:46 +03:00
1 parent e5f0df9273
commit 8e040543de
3 files changed
+62 -34

No files matched your search

@@ -24,7 +24,9 @@ import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.testTag
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.semantics.Role
import androidx.compose.ui.text.font.FontWeight
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import androidx.lifecycle.viewmodel.compose.viewModel
@@ -108,7 +110,8 @@ fun SessionsScreen(
modifier =
Modifier
.fillMaxWidth()
.clickable {
.testTag("session_card_${session.id}")
.clickable(role = Role.Button) {
NavigationController.pendingSessionId = session.id
NavigationController.navigateTo(ChatScreen)
},