MDN self-hosted library · e01.org

ARIA: graphics-symbol role

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

html
<svg aria-label="Parking lot" viewBox="0 0 700 220">
  <title>Parking lot with designated spaces</title>
  <g role="graphics-symbol" aria-label="Available parking space">
    <rect
      x="90"
      y="50"
      width="100"
      height="150"
      fill="#3986ca"
      stroke="black"
      stroke-width="3" />
    <text
      x="140"
      y="135"
      text-anchor="middle"
      fill="black"
      font-size="35"
      font-weight="bold">
      P
    </text>
    <text x="140" y="180" text-anchor="middle" fill="black" font-size="18">
      Available
    </text>
  </g>
  <g role="graphics-symbol" aria-label="Reserved parking space">
    <rect
      x="290"
      y="50"
      width="100"
      height="150"
      fill="#cac539"
      stroke="black"
      stroke-width="3" />
    <text
      x="340"
      y="135"
      text-anchor="middle"
      fill="black"
      font-size="35"
      font-weight="bold">
      P
    </text>
    <text x="340" y="180" text-anchor="middle" fill="black" font-size="18">
      Reserved
    </text>
  </g>
  <g role="graphics-symbol" aria-label="Unavailable parking space">
    <rect
      x="490"
      y="50"
      width="100"
      height="150"
      fill="#b3b3b3"
      stroke="black"
      stroke-width="3" />
    <text
      x="540"
      y="135"
      text-anchor="middle"
      fill="black"
      font-size="35"
      font-weight="bold">
      P
    </text>
    <circle
      cx="540"
      cy="123"
      r="32"
      fill="none"
      stroke="black"
      stroke-width="4" />
    <line x1="517" y1="100" x2="563" y2="146" stroke="black" stroke-width="4" />
    <text x="540" y="180" text-anchor="middle" fill="black" font-size="16">
      Unavailable
    </text>
  </g>
</svg>