Skip to content

Commit

Permalink
Filter out some images from the accessibility tree
Browse files Browse the repository at this point in the history
  • Loading branch information
DataTriny committed Feb 17, 2025
1 parent cb264ac commit e26c7e6
Show file tree
Hide file tree
Showing 19 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions internal/compiler/widgets/common/menus.slint
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export component PopupMenuImpl inherits Window {
if entry.has-sub-menu : Image {
source: @image-url("../fluent/_arrow_forward.svg");
colorize: menu-text.color;
accessible-role: none;
}
}
TouchArea {
Expand Down
1 change: 1 addition & 0 deletions internal/compiler/widgets/cosmic/checkbox.slint
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export component CheckBox {
source: Icons.check-mark;
colorize: CosmicPalette.accent-foreground;
width: 12px;
accessible-role: none;

animate colorize { duration: 150ms; }
}
Expand Down
1 change: 1 addition & 0 deletions internal/compiler/widgets/cosmic/combobox.slint
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export component ComboBox {
height: 16px;
colorize: CosmicPalette.control-foreground;
source: Icons.dropdown;
accessible-role: none;
}
}

Expand Down
1 change: 1 addition & 0 deletions internal/compiler/widgets/cosmic/components.slint
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ export component ListItem {
visible: root.is-selected;
colorize: text.color;
source: Icons.check-mark;
accessible-role: none;
}
}

Expand Down
1 change: 1 addition & 0 deletions internal/compiler/widgets/cosmic/tableview.slint
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ component TableViewColumn inherits Rectangle {
width: 12px;
y: (parent.height - self.height) / 2;
source: root.sort-order == SortOrder.ascending ? Icons.arrow-down : Icons.arrow-up;
accessible-role: none;

animate colorize { duration: 150ms; }
}
Expand Down
1 change: 1 addition & 0 deletions internal/compiler/widgets/cupertino/checkbox.slint
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ export component CheckBox {
source: Icons.check-mark;
colorize: root.icon-color;
width: 12px;
accessible-role: none;

animate colorize { duration: 150ms; }
}
Expand Down
2 changes: 2 additions & 0 deletions internal/compiler/widgets/cupertino/combobox.slint
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,14 @@ export component ComboBox {
x: (parent.width - self.width) / 2;
colorize: CupertinoPalette.accent-foreground;
source: Icons.chevron-up;
accessible-role: none;
}

bottom-icon := Image {
x: (parent.width - self.width) / 2;
colorize: CupertinoPalette.accent-foreground;
source: Icons.chevron-down;
accessible-role: none;
}
}
}
Expand Down
1 change: 1 addition & 0 deletions internal/compiler/widgets/cupertino/components.slint
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export component ListItem {
colorize: CupertinoPalette.foreground;
visible: root.is-selected;
width: 10px;
accessible-role: none;
}

i-text := Text {
Expand Down
1 change: 1 addition & 0 deletions internal/compiler/widgets/cupertino/spinbox.slint
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ component SpinBoxButton {
image-fit: contain;
colorize: root.icon-color;
width: 12px;
accessible-role: none;

animate colorize { duration: 150ms; }
}
Expand Down
1 change: 1 addition & 0 deletions internal/compiler/widgets/cupertino/tableview.slint
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ component TableViewColumn inherits Rectangle {
width: 8px;
y: (parent.height - self.height) / 2;
source: root.sort-order == SortOrder.ascending ? Icons.chevron-down : Icons.chevron-up;
accessible-role: none;

animate colorize { duration: 150ms; }
}
Expand Down
1 change: 1 addition & 0 deletions internal/compiler/widgets/fluent/checkbox.slint
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export component CheckBox {
source: Icons.check-mark;
colorize: FluentPalette.accent-foreground;
width: 12px;
accessible-role: none;

animate colorize { duration: 150ms; }
}
Expand Down
1 change: 1 addition & 0 deletions internal/compiler/widgets/fluent/combobox.slint
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ export component ComboBox {
width: 12px;
source: Icons.dropdown;
y: 2px;
accessible-role: none;

animate colorize { duration: 150ms; }
}
Expand Down
1 change: 1 addition & 0 deletions internal/compiler/widgets/fluent/scrollview.slint
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ component ScrollViewButton inherits TouchArea {
width: parent.width;
source: root.icon;
colorize: FluentPalette.border;
accessible-role: none;

animate colorize, opacity { duration: 150ms; }
animate width, height { duration: 150ms; easing: ease-out; }
Expand Down
1 change: 1 addition & 0 deletions internal/compiler/widgets/fluent/spinbox.slint
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ component SpinBoxButton {
image-fit: contain;
colorize: FluentPalette.text-secondary;
width: 12px;
accessible-role: none;

animate colorize { duration: 150ms; }
}
Expand Down
1 change: 1 addition & 0 deletions internal/compiler/widgets/fluent/tableview.slint
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ component TableViewColumn inherits Rectangle {
width: 12px;
y: (parent.height - self.height) / 2;
source: root.sort-order == SortOrder.ascending ? Icons.arrow-down : Icons.arrow-up;
accessible-role: none;

animate colorize { duration: 150ms; }
}
Expand Down
1 change: 1 addition & 0 deletions internal/compiler/widgets/material/checkbox.slint
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ export component CheckBox {
height: 80%;
source: Icons.check-mark;
colorize: MaterialPalette.accent-foreground;
accessible-role: none;

states [
disabled when !root.enabled : {
Expand Down
1 change: 1 addition & 0 deletions internal/compiler/widgets/material/combobox.slint
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ export component ComboBox {
y: (parent.height - self.height) / 2;
source: Icons.expand-more;
colorize: MaterialPalette.control-foreground;
accessible-role: none;
}
}

Expand Down
2 changes: 2 additions & 0 deletions internal/compiler/widgets/material/spinbox.slint
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ export component SpinBox {
source: Icons.arrow-drop-up;
opacity: parent.icon-opacity;
colorize: parent.icon-fill;
accessible-role: none;
}

clicked => {
Expand All @@ -150,6 +151,7 @@ export component SpinBox {
source: Icons.arrow-drop-down;
opacity: parent.icon-opacity;
colorize: parent.icon-fill;
accessible-role: none;
}

clicked => {
Expand Down
1 change: 1 addition & 0 deletions internal/compiler/widgets/material/tableview.slint
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ component TableViewColumn inherits Rectangle {
Icons.arrow-upward :
Icons.arrow-downward;
colorize: MaterialPalette.control-foreground;
accessible-role: none;
}
}

Expand Down

0 comments on commit e26c7e6

Please sign in to comment.