“aria-posinset” ARIA Label for Accessibility

The aria-posinset attribute is set on items that do not appear in the Document Object Model (DOM). When a table element is not displayed in its entirety within the frame, the aria-posinset attribute can be used to indicate where that element falls within the set of table elements. The aria-posinset attribute can be utilized by the developer in order to supply the user with information regarding where the element is positioned on the set of elements. Table elements, treegrid elements, and other semantic table components that are not exposed in the DOM are all qualified options for using the aria-posinset attribute. The aria-posinset can also be utilized in conjunction with the ARIA Label known as aria-setsize.

What is the function of the “aria-posinset” ARIA Label?

The aria-posinset function is to indicate the location or position of the user in the treegrid or table, it benefits the user when the elements are not fully present in the document object model. It can be used as an identifier to actively locate where it is positioned, it also provides information of the complete table or treegrid. The value of the aria-posinset represents its position in the feed, along with the aria-setsize. It is set to either the number of articles that have been loaded or the total number in the feed, depending on which value is most helpful to users. The CSS “order” properties are mostly used for grid layouts, if using the “order” to match relations between elements, the aria-owns can do it best.

What are the uses of the “aria-posinset” ARIA Label?

Listed below are the uses of the “aria-posinset” ARIA Label. 

  • Article role: It indicates a part of a page that can be an independent page, as part of a document, or within a webpage.
  • Comment role: It is a role that reacts to an article or content, it can also be replied with other comments that precede in hierarchy form.
  • Listitem role: It is used, together with the list role, to identify an item contained in a list group.
  • Menuitem role: It indicates that an element is an option that has a set of choices indicated by a menubar or menu.
  • Option role: It provides selectable items that can be found on List Items and Combo boxes. It is used on elements, <select>, <label>, and <option>.

Example Uses of “aria-posinset” ARIA Label

Listed below are the example uses of the “aria-posinset” ARIA Label.

The aria-posinset attribute can be utilized in table elements as well as treegrid and other semantic table components that are hidden by the DOM.

<h2 id="itemlist">List of Precious Metals</h2>
<ul role="listbox" aria-labelledby="itemlist">
  <li role="option" aria-setsize="118" aria-posinset="1">Platinum</li>
  <li role="option" aria-setsize="118" aria-posinset="3">Gold</li>
  <li role="option" aria-setsize="118" aria-posinset="11">Silver</li>
  <li role="option" aria-setsize="118" aria-posinset="19">Bronze</li>
<h2 id="itemlist">Type of Car</h2>
<ul role="listbox" aria-labelledby="itemlist">
  <li role="option" aria-setsize="118" aria-posinset="1">SUV</li>
  <li role="option" aria-setsize="118" aria-posinset="3">Van</li>
  <li role="option" aria-setsize="118" aria-posinset="11">Pickup Truck</li>
  <li role="option" aria-setsize="118" aria-posinset="19">Sedan</li>
<h2 id="itemlist">Type of Birds</h2>
<ul role="listbox" aria-labelledby="itemlist">
  <li role="option" aria-setsize="118" aria-posinset="1">Eagle</li>
  <li role="option" aria-setsize="118" aria-posinset="3">Crow</li>
  <li role="option" aria-setsize="118" aria-posinset="11">Ostrich</li>
  <li role="option" aria-setsize="118" aria-posinset="19">Penguin</li>
<h2 id="itemlist">Type of House</h2>
<ul role="listbox" aria-labelledby="itemlist">
  <li role="option" aria-setsize="118" aria-posinset="1">Mansion</li>
  <li role="option" aria-setsize="118" aria-posinset="3">Apartment</li>
  <li role="option" aria-setsize="118" aria-posinset="11">Town House</li>
  <li role="option" aria-setsize="118" aria-posinset="19">Rest House</li>
<h2 id="itemlist">Types of Animals</h2>
<ul role="listbox" aria-labelledby="itemlist">
  <li role="option" aria-setsize="118" aria-posinset="1">Mammals</li>
  <li role="option" aria-setsize="118" aria-posinset="3">Amphibians</li>
  <li role="option" aria-setsize="118" aria-posinset="11">Reptiles</li>
  <li role="option" aria-setsize="118" aria-posinset="19">Birds</li>

What is the related ARIA Label to “aria-posinset”?

The aria-setsize is related to the aria-posinset because they are both used to identify and set the position of the user to the screen reader. The aria-setsize is an attribute that defines the size that the browser computes, especially in tables and grids, the set size to determine how the content would fit in the cell. The purpose of the aria-setsize is to set the right size of the space in order to fit in the contents needed to display in the browser. The function of aria-setsize is to define a number of items in the set of list items or tree items if the presence of the list is not yet shown by the DOM.

Holistic SEO
Follow SEO

Leave a Comment

“aria-posinset” ARIA Label for Accessibility

by Holistic SEO time to read: 4 min