Example 1 — Get and Set (MDN)
Read the current orientation, then switch the slider to horizontal.
let el = document.getElementById("handle_zoomSlider");
console.log(el.ariaOrientation); // "vertical"
el.ariaOrientation = "horizontal";
console.log(el.ariaOrientation); // "horizontal" How It Works
- Select the slider. It already has
aria-orientation="vertical". - Read
ariaOrientation. Returns the string"vertical". - Assign
"horizontal". Updates the reflected attribute. - Read again. Confirms the new orientation for AT.

