Populates collection info count for A11y toggle feature pages.
This helps an accessibility service like TalkBack inform the user that there are items that are skipped when navigating the list because they are unimportant to accessibility. Bug: 318607873 Test: atest AccessibilityFragmentUtilsTest Test: atest ToggleScreenMagnificationPreferenceFragmentTest Test: Enable TalkBack that supports the collection info count feature, open any of the pages from the bug, observe the item count and (un)important count are correct. Flag: com.android.settings.accessibility.toggle_feature_fragment_collection_info Change-Id: If64c89f2eb2f8301076baa79b9530124c850d2fc
This commit is contained in:
@@ -68,7 +68,8 @@ public class ToggleScreenReaderPreferenceFragmentForSetupWizard
|
||||
Bundle savedInstanceState) {
|
||||
if (parent instanceof GlifPreferenceLayout) {
|
||||
final GlifPreferenceLayout layout = (GlifPreferenceLayout) parent;
|
||||
return layout.onCreateRecyclerView(inflater, parent, savedInstanceState);
|
||||
return AccessibilityFragmentUtils.addCollectionInfoToAccessibilityDelegate(
|
||||
layout.onCreateRecyclerView(inflater, parent, savedInstanceState));
|
||||
}
|
||||
return super.onCreateRecyclerView(inflater, parent, savedInstanceState);
|
||||
}
|
||||
|
Reference in New Issue
Block a user