<article id="article1" aria-posinset="1">…</article>
<article id="article2" aria-posinset="2">…</article>Element: ariaPosInSet property / notebook
Element: ariaPosInSet property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
let el = document.getElementById("article2");
console.log(el.ariaPosInSet); // "2"
el.ariaPosInSet = "3";
console.log(el.ariaPosInSet); // "3"