+15
−0
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
Raw adapter counts when surfaced to users can be misleading if some of the items are unimportant for accessibility. This has traditionally been a rich source of accessibility bugs (see b/137113167 and 9 duplicates). We handled this issue previously by removing Collection[Item]Info from commonly used collections; We reinstated Collection[Item]Info recently because its absence blocked the development of other features important to the platform. This effectively reopens all bugs related to collection counts previously fixed by removing Collection[Item]Info. This commit provides a way for developers to specify the collection count and the number of important views (they can do this via an AccessibilityDelegate). Accessibility services like Talkback can then surface the correct count information to users. The new fields also make it possible to describe the size of staggered grids, which do not neatly conform to row/column semantics. Bug: 266133760 Bug: 137113167 Bug: 269756921 Test: See AccessibilityNodeInfo_CollectionInfoTest.java Change-Id: I86c9c793bb43fd247db13641c2bf1eb9ff24d09c