Skip to content

Commit

Permalink
feat(ui5-li, ui5-li-tree, ui5-li-custom, ui5-upload-collection-item):…
Browse files Browse the repository at this point in the history
… implement role property (#2236)
  • Loading branch information
fifoosid authored Sep 28, 2020
1 parent bc6dfec commit 01a1fb0
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion packages/main/src/ListItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,20 @@ const metadata = {
type: Boolean,
},

/**
* Used to define the role of the list item.
*
* @private
* @type {String}
* @defaultvalue "option"
* @since 1.0.0-rc.9
*
*/
role: {
type: String,
defaultValue: "option",
},

_mode: {
type: ListMode,
defaultValue: ListMode.None,
Expand Down Expand Up @@ -294,7 +308,7 @@ class ListItem extends ListItemBase {

get _accInfo() {
return {
role: "option",
role: this.role,
ariaExpanded: undefined,
ariaLevel: undefined,
ariaLabel: this.i18nBundle.getText(ARIA_LABEL_LIST_ITEM_CHECKBOX),
Expand Down

0 comments on commit 01a1fb0

Please sign in to comment.