Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Children of Flickable widgets are included in the accessibility tree when they shouldn't #7381

Open
DataTriny opened this issue Jan 15, 2025 · 1 comment
Labels
bug Something isn't working need triaging Issue that the owner of the area still need to triage

Comments

@DataTriny
Copy link
Contributor

DataTriny commented Jan 15, 2025

Bug Description

Elements contained in a StandardListView end up in the accessibility tree even though they are fully hidden. This seem to happen above the list view but not below. I haven't tested horizontally. There seem to have an offset of one item.

To reproduce

  • Run the crud example
  • Scroll to the bottom of the list view
  • Now you should be able to see with Accessibility Insights for Windows for instance that the first item is still seen above the list view in the accessibility tree. If you scroll to the top, you should observe that the last item is not present below the list view.

Reproducible Code (if applicable)

Unmodified crud example exhibits the bug. Adding more items to the list as well as a padding at the top of the grid helps demonstrate that only one element seem to escape at most.

Environment Details

  • Slint Version: master branch
  • Platform/OS: Windows 11
  • Programming Language: Rust
  • Backend/Renderer: winit

Product Impact

No response

@DataTriny DataTriny added bug Something isn't working need triaging Issue that the owner of the area still need to triage labels Jan 15, 2025
@DataTriny
Copy link
Contributor Author

To explain a bit more the importance of this issue:

List views use the accessible-delegate-focus property to indicate where the focus is. It is an index in the list view children. Since not all children are included in the accessibility tree, we currently get a lot of panics where AccessKit sees the focus on a node which does not exist. The accessible-delegate-focus property would therefore have to take into account the first visible item, by subtracting the result of first-visible-item for instance.

Side note, first-visible-item would have to be modified like so to actually return the first visible item (and not the first fully visible item):

pure function first-visible-item() -> int {
    return min(root.model.length - 1, max(0, floor(-root.viewport-y / root.item-height)));
}

I don't know what's the situation on Qt. If all items are shown at all times over there then two separate paths will be needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working need triaging Issue that the owner of the area still need to triage
Projects
None yet
Development

No branches or pull requests

1 participant