Implement accessible-delegate-focus for the AccessKit backend

This commit is contained in:
DataTriny 2024-10-21 18:54:29 +02:00 committed by Simon Hausmann
parent 6717e627a1
commit 28b5a67583
2 changed files with 25 additions and 7 deletions

View file

@ -33,6 +33,8 @@ component StandardListViewBase inherits ListView {
private property <length> current-item-y: root.item-y(root.focus-item);
private property <int> focus-item: 0;
accessible-delegate-focus: root.focus-item;
pure function first-visible-item() -> int {
return min(root.model.length - 1, max(0, round(-root.viewport-y / root.item-height)));
}