aria-posinset (property)

Aria-posinset property defines an element’s number or position in the current set of listitems or treeitems. Defining aria-posinset is not required if all elements in the set are present in the DOM.

If all items in a set are present in the document structure, it is not necessary to set aria-posinset attribute, as the user agent can automatically calculate the set size and position for each item. However, if only a portion of the set is present in the document structure at a given point of time, aria-posinset property is needed to provide an explicit indication of an element’s position.

Values of aria-posinset (property)

The value of aria-posinset property is an integer. Since the aria-setsize defines overall number of items in the widget or component the aria-posinset value will be greater than 0 and less than or equal to the value of aria-setsize.

Aria-posinset supported roles

Used in roles

Inherits into roles:

Have a look at a sample implementation of aria-posinset property.

Comments are closed.