Changelog: Add accessible-selectable and accessible-selected properties

This commit is contained in:
Arnold Loubriat 2024-10-13 22:33:05 +02:00 committed by Simon Hausmann
parent 66ebcbd1b7
commit 19f09950c2
8 changed files with 60 additions and 0 deletions

View file

@ -120,6 +120,8 @@ pub fn reserved_accessibility_properties() -> impl Iterator<Item = (&'static str
"accessible-action-set-value",
Type::Callback { return_type: None, args: vec![Type::String] },
),
("accessible-selectable", Type::Bool),
("accessible-selected", Type::Bool),
]
.into_iter()
}

View file

@ -112,6 +112,8 @@ export component ListItem {
layout := HorizontalLayout {
padding-bottom: 8px;
accessible-role: list-item;
accessible-selectable: true;
accessible-selected: root.is-selected;
StateLayerBase {
width: 100%;

View file

@ -74,6 +74,8 @@ export component ListItem {
padding-left: root.padding-horizontal;
padding-right: root.padding-horizontal;
accessible-role: list-item;
accessible-selectable: true;
accessible-selected: root.is-selected;
i-background := Rectangle {
background: transparent;

View file

@ -79,6 +79,8 @@ export component ListItem {
padding-right: 16px;
spacing: 4px;
accessible-role: list-item;
accessible-selectable: true;
accessible-selected: root.is-selected;
i-text := Text {
text: root.item.text;

View file

@ -146,6 +146,8 @@ export component ListItem {
padding-left: 12px;
padding-right: 12px;
accessible-role: list-item;
accessible-selectable: true;
accessible-selected: root.is-selected;
label := Text {
text: root.item.text;