Status Update
Comments
si...@google.com <si...@google.com>
si...@google.com <si...@google.com>
si...@google.com <si...@google.com> #2
si...@google.com <si...@google.com>
si...@google.com <si...@google.com>
si...@google.com <si...@google.com>
si...@google.com <si...@google.com> #3
Since this hasn't been implemented yet, please consider the case where the user needs to access the FAB (or other component) while they're in the middle of an infinitely scrolling list (like a Twitter feed) when adding support.
The traversal methods had limited usefulness (but agreed with Fanny, they were useful :+1:) since they would only work at the start of a user journey. If the user wants to navigate from a list item to a FAB or an action item in the app bar and back, then it's less useful.
si...@google.com <si...@google.com>
si...@google.com <si...@google.com> #4
Yinglei, yes, I had an impression that we don't want to expose this API. Can we solve the issue with FAB without it?
As for the z-order, we currently order them as far as I remember. So whichever element is on top it will be focused first, correct?
fanny.pluvinage@ Do you have a particular use case in mind where you need to re-order elements for accessibility in z-direction?
si...@google.com <si...@google.com> #5
I understand why you don't want to expose this API.
Maybe i've done something wrong, but when adding a FAB Button after a LazyColumn, the LazyColumn get the focus first even if I change the zIndex modifier = Modifier.zIndex(0f)
(setting the FAB Button on top or behind, it seems that it doesn't change anything.
FloatingActionButton(onClick = { /*TODO*/ },
modifier = Modifier.zIndex(0f)) {
Icon(painter = painterResource(id = R.drawable.ic_star_rate),
contentDescription = "Add movie")
}
LazyColumn(modifier = Modifier.zIndex(1f)) {
items(viewModel.movies) { message ->
MovieItem(message, backgroundColors.random())
}
}
I had a similar usecase to design a card like visual element earlier this year when I was doing SwiftUI. I was able to resolve it with .accessibility(sortPriority: 2)
I'll try to send you a screenshot later, when Xcode will have finish building ...
si...@google.com <si...@google.com> #6
For
For #4, currently, I think elements on top will be focused last (if it is not completely covering the node below it). Maybe we should consider changing it (don't break the finding node for touch explore though)?
lp...@google.com <lp...@google.com> #8
si...@google.com <si...@google.com> #9
headings, another mode could allow navigation between fixed components on
screen like the app bar and fab (as an idea).
Since it hasn't been exposed in the compose API yet, I wanted to highlight
this limitation of the existing traversal APIs; most of the accessibility
APIs were added before I was an Android dev so this is a unique chance for
feedback ☺️
On Tue, 27 Apr 2021, 20:24 , <buganizer-system@google.com> wrote:
si...@google.com <si...@google.com> #10
screen like the app bar and fab " seems to be a feature which should implemented in talkback.
@Anastasia @Alex
Maybe when we order nodes, if two nodes partially overlap, we should consider z index first(top one first)? instead of relying on bounds (the current approach adopted from ViewGroup.java)?
si...@google.com <si...@google.com> #11
Yes, disambiguating based on zIndex
sounds like a good idea, I can't think of any reason not to do it that way. It looks like the reason ViewGroup didn't have it is simply because View System didn't have zIndex
(it supported translationZ
, but structurally zIndex
is better suited to calculate overlap order without requiring any matrix math).
si...@google.com <si...@google.com> #12
I agree with Yinglei that if TalkBack's auto-scrolling is preventing access to a FAB, that bug is likely best addressed in TalkBack, perhaps with a heuristic that everything on the screen should be traversed before a list that will auto-scroll. If ordering nodes based on z helps in the meantime, though, that seems like a reasonable change to make.
Since system-level FABs are in their own windows, maybe app-level FABs should be in their own panes? That seems semantically correct, and TalkBack does announce panes when they appear. Not sure if/how this concept is exposed in Compose, though.
ap...@google.com <ap...@google.com> #13
Here is the API that I think is doing that in SwiftUI
The developer could add a sortPriority to a composable and if we detect that it will influence the Semantic sort : you can first order by sortPriority then by ordering left-to-right, top-to-bottom.
(sorry for the intrusion but although the solution "consider z index first(top one first)?" is a working fix, I don't think it provide the best user experience and will probably be tricky to handle with the auto-scroll).
Description
No description yet.