MDN self-hosted library · e01.org

ARIA: scrollbar role

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

html
<div role="scrollbar"><h3>Title of my scrollbar</h3></div>
html
<div role="scrollbar"><h3 role="presentation">Title of my scrollbar</h3></div>
html
<div role="scrollbar">Title of my scrollbar</div>
html
<div id="pi-label">Pi</div>
<div id="pi">
  3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679
</div>
<div
  role="scrollbar"
  aria-labelledby="pi-label"
  aria-controls="pi"
  aria-orientation="horizontal"
  aria-valuenow="0"
  aria-valuemin="0"
  aria-valuemax="100">
  <div id="thumb"></div>
</div>
html
<h3 id="PI">Pi</h3>
<p class="pi" tabindex="0" aria-labelledby="PI">
  3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679
</p>
css
.pi {
  overflow: auto;
  max-width: 100%;
}