mirror of
https://github.com/slint-ui/slint.git
synced 2025-11-02 04:48:27 +00:00
Make accessible-position-in-set zero-based
This commit is contained in:
parent
97219c21bf
commit
17207b0508
5 changed files with 5 additions and 5 deletions
|
|
@ -78,7 +78,7 @@ Use the following `accessible-` properties to make your items interact well with
|
|||
- **`accessible-placeholder-text`** (_in_ _string_): A placeholder text to use when the item's value is empty. Applies to text elements.
|
||||
- **`accessible-selectable`** (_in_ _bool_): Whether the element can be selected or not.
|
||||
- **`accessible-selected`** (_in_ _bool_): Whether the element is selected or not. This maps to the "is-selected" state of listview items.
|
||||
- **`accessible-position-in-set`** (_in_ _int_): The index (starting from 1) of this element in a group of similar elements. Applies to list items, radio buttons and other elements.
|
||||
- **`accessible-position-in-set`** (_in_ _int_): The index (starting from 0) of this element in a group of similar elements. Applies to list items, radio buttons and other elements.
|
||||
- **`accessible-size-of-set`** (_in_ _int_): The total number of elements in a group. Applies to all elements of a group like list items, radio buttons and other elements, but not to their parent container like list views, radio button groups or other grouping elements.
|
||||
|
||||
You can also use the following callbacks that are going to be called by the accessibility framework:
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ export component ListItem {
|
|||
accessible-label: root.item.text;
|
||||
accessible-selectable: true;
|
||||
accessible-selected: root.is-selected;
|
||||
accessible-position-in-set: root.index + 1;
|
||||
accessible-position-in-set: root.index;
|
||||
accessible-size-of-set: root.total-items;
|
||||
|
||||
states [
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ export component ListItem {
|
|||
accessible-label: root.item.text;
|
||||
accessible-selectable: true;
|
||||
accessible-selected: root.is-selected;
|
||||
accessible-position-in-set: root.index + 1;
|
||||
accessible-position-in-set: root.index;
|
||||
accessible-size-of-set: root.total-items;
|
||||
|
||||
states [
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ export component ListItem {
|
|||
accessible-label: root.item.text;
|
||||
accessible-selectable: true;
|
||||
accessible-selected: root.is-selected;
|
||||
accessible-position-in-set: root.index + 1;
|
||||
accessible-position-in-set: root.index;
|
||||
accessible-size-of-set: root.total-items;
|
||||
|
||||
states [
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ export component ListItem {
|
|||
accessible-label: root.item.text;
|
||||
accessible-selectable: true;
|
||||
accessible-selected: root.is-selected;
|
||||
accessible-position-in-set: root.index + 1;
|
||||
accessible-position-in-set: root.index;
|
||||
accessible-size-of-set: root.total-items;
|
||||
|
||||
states [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue