Skip to content

Commit 01a1fb0

Browse files
authored
feat(ui5-li, ui5-li-tree, ui5-li-custom, ui5-upload-collection-item): implement role property (#2236)
1 parent bc6dfec commit 01a1fb0

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

packages/main/src/ListItem.js

+15-1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,20 @@ const metadata = {
5656
type: Boolean,
5757
},
5858

59+
/**
60+
* Used to define the role of the list item.
61+
*
62+
* @private
63+
* @type {String}
64+
* @defaultvalue "option"
65+
* @since 1.0.0-rc.9
66+
*
67+
*/
68+
role: {
69+
type: String,
70+
defaultValue: "option",
71+
},
72+
5973
_mode: {
6074
type: ListMode,
6175
defaultValue: ListMode.None,
@@ -294,7 +308,7 @@ class ListItem extends ListItemBase {
294308

295309
get _accInfo() {
296310
return {
297-
role: "option",
311+
role: this.role,
298312
ariaExpanded: undefined,
299313
ariaLevel: undefined,
300314
ariaLabel: this.i18nBundle.getText(ARIA_LABEL_LIST_ITEM_CHECKBOX),

0 commit comments

Comments
 (0)