Set accessible-item-selected on tabs

This commit is contained in:
Arnold Loubriat 2025-01-02 19:43:19 +01:00 committed by Simon Hausmann
parent 67f6e1a737
commit 60aacc8f82
7 changed files with 9 additions and 0 deletions

View file

@ -54,6 +54,7 @@ export component TabImpl inherits Rectangle {
accessible-label: root.title;
accessible-item-index: root.tab-index;
accessible-item-selectable: true;
accessible-item-selected: root.is-current;
Rectangle {
y: 0;

View file

@ -52,6 +52,7 @@ export component TabImpl inherits Rectangle {
accessible-label: root.title;
accessible-item-index: root.tab-index;
accessible-item-selectable: true;
accessible-item-selected: root.is-current;
if (root.is-current || i-touch-area.pressed): Rectangle {
width: 100%;

View file

@ -52,6 +52,7 @@ export component TabImpl inherits Rectangle {
accessible-label: root.title;
accessible-item-index: root.tab-index;
accessible-item-selectable: true;
accessible-item-selected: root.is-current;
Rectangle {
clip: true;

View file

@ -49,6 +49,7 @@ export component TabImpl inherits Rectangle {
accessible-label: root.title;
accessible-item-index: root.tab-index;
accessible-item-selectable: true;
accessible-item-selected: root.active;
i-container := Rectangle {
background: MaterialPalette.alternate-background;

View file

@ -11,6 +11,7 @@ export component TabImpl inherits NativeTab {
accessible-label <=> root.title;
accessible-item-index: root.tab-index;
accessible-item-selectable: true;
accessible-item-selected: root.tab-index == root.current;
}
export component TabBarImpl inherits TabBarBase {