Skip to content

Commit

Permalink
docs: improve virtual list item accessible name generator docs (#8356)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomivirkki authored Dec 17, 2024
1 parent b402736 commit 23271ea
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/virtual-list/src/vaadin-virtual-list-mixin.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ export declare class VirtualListMixinClass<TItem = VirtualListDefaultItem> {

/**
* A function that generates accessible names for virtual list items.
* The function gets the item as an argument and the
* return value should be a string representing that item. The
* result gets applied to the corresponding virtual list child element
* as an `aria-label` attribute.
*/
itemAccessibleNameGenerator?: (item: TItem) => string;

Expand Down
4 changes: 4 additions & 0 deletions packages/virtual-list/src/vaadin-virtual-list-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ export const VirtualListMixin = (superClass) =>

/**
* A function that generates accessible names for virtual list items.
* The function gets the item as an argument and the
* return value should be a string representing that item. The
* result gets applied to the corresponding virtual list child element
* as an `aria-label` attribute.
*/
itemAccessibleNameGenerator: {
type: Function,
Expand Down

0 comments on commit 23271ea

Please sign in to comment.