Skip to content

Commit

Permalink
fix(list, tree): stateless list and tree should have aria-readonly (#980
Browse files Browse the repository at this point in the history
)
  • Loading branch information
wsuwt authored Oct 2, 2023
1 parent 7151558 commit 5f7713f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/elements/src/list/elements/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,14 @@ export class List<T extends DataItem = ItemData> extends ControlElement {
this.renderTimestamp.clear(); // force render of all items
this.setAttribute('aria-multiselectable', this.multiple ? 'true' : 'false');
}

if (changeProperties.has('stateless')) {
if (this.stateless) {
this.setAttribute('aria-readonly', 'true');
} else {
this.removeAttribute('aria-readonly');
}
}
}

/**
Expand Down

0 comments on commit 5f7713f

Please sign in to comment.