[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-27 (世界標準時間)。"],[],[],null,["# Inspect and debug\n\nInspect\n-------\n\nSeveral tools can help you quickly inspect your content from an accessibility\npoint of view:\n\n- [Android Accessibility Suite](https://play.google.com/store/apps/details?id=com.google.android.marvin.talkback): Includes Accessibility Menu, Select to Speak, Switch Access, and TalkBack, which provide insight into how your app's semantics work for users of these technologies. Testing with Android's assistive technologies is highly recommended as the best way to understand what your users with accessibility needs will experience.\n- [Layout Inspector](/develop/ui/compose/tooling/debug#layout_inspector): Lets you inspect and debug semantics of each composable, and helps identify any missing or incorrect information.\n- [Accessibility Scanner](https://support.google.com/accessibility/android/answer/6376570) app: Scans your screen and provides suggestions to improve its accessibility by identifying some common pitfalls.\n\nDebug\n-----\n\nBetween Compose, the semantics system, and Android accessibility services, you\nmight run into unexpected accessibility behaviors that are difficult to trace.\nSemantic properties can help you understand why your components are behaving\nthe way that they are.\n\nYou can debug accessibility behavior issues with the [Layout Inspector](/develop/ui/compose/tooling/debug#layout_inspector) in\nAndroid Studio, TreeDebug in TalkBack developer settings, or `ComposeTestRule`'s\n[`printToLog`](/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.SemanticsNodeInteraction).printToLog(kotlin.String,kotlin.Int)). All of these tools can provide information about nodes\n(and their properties) that are exposed to accessibility services by Compose.\n\nThe following example uses Layout Inspector to debug a screen with three\nelements where, with accessibility services on, the first one isn't being\nselected, and the second one doesn't have any action feedback associated with\nit. You can examine the semantic properties to find potential issues.\n\nThe component tree in Layout Inspector contains information about an element's\nbounds, parameters, and other semantic information associated with it. In the\ntree, all three elements are recognized:\n**Figure 2.** Layout Inspector with all three elements..\n\nThe first element has the `hideFromAccessibility` property applied. This\nindicates that the element may be marked as hidden somewhere in the semantics\ntree, or it is obscured by some decorative overlay.\n**Figure 3.** Layout Inspector: first element with `hideFromAccessibility`.\n\nThe second element has a focus property, but no `onClick` like the previous\nelement. Therefore, it might be missing a `clickable` modifier somewhere, which\nis why an accessibility service like TalkBack may not be announcing some\naction signal to the user:\n**Figure 4.** Layout Inspector: second element with `focused`.\n\nThe third text element has all the necessary properties---it is focusable, has\nan `onClick`, and other additional semantics applied---which is why it's\ninterpreted as expected.\n**Figure 5.** Layout Inspector: third element with all APIs.\n\nIn this way, you can use debugging tools to investigate why certain\nannouncements or selections aren't performed by accessibility services.\n\nRecommended for you\n-------------------\n\n- Note: link text is displayed when JavaScript is off\n- [Accessibility in Compose](/develop/ui/compose/tooling/debug#layout_inspector)\n- \\[Material Design 2 in Compose\\]\\[19\\]\n- [Testing your Compose layout](https://support.google.com/accessibility/android/answer/6376570)"]]