Difference between revisions of "Canvas fallback"

From Level Access Web Labs
Jump to navigation Jump to search
(Created page with "<html> <canvas role="graphics-document"> <p id="scene-desc" role="img" aria-label="The Dungeon" aria-describedby="scene-desc"> The door opens into a...")
 
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<html>
 
<html>
 +
<canvas>
 +
    <p id="scene-desc" 
 +
      aria-label="The Dungeon"
 +
      aria-describedby="scene-desc">
 +
      The door opens into a long hallway.
 +
      Every few steps on either side are barred doors.
 +
      Moisture drips from the stone walls.
 +
    </p>
 +
    <p id="grue-1" role="img"
 +
      aria-label="Grue"
 +
      aria-describedby="grue-1">
 +
      An amorphous and poorly defined, but unmistakably sinister,
 +
      creature blocks the passage.
 +
  </p>
 +
  <!-- more DOM elements representing game controls -->
 +
</canvas>
 +
 
<canvas role="graphics-document">
 
<canvas role="graphics-document">
 
     <p id="scene-desc" role="img"  
 
     <p id="scene-desc" role="img"  
Line 15: Line 32:
 
   </p>
 
   </p>
 
   <!-- more DOM elements representing game controls -->
 
   <!-- more DOM elements representing game controls -->
 +
</canvas>
 +
 +
<canvas>
 +
  This is some text.
 +
</canvas>
 +
<canvas aria-label="This is an aria-label">
 +
  This is some text inside a canvas element that has an aria-label.
 +
</canvas>
 +
<canvas aria-label="This is an aria-label for a canvas with role img" role="img">
 +
  This is some text inside a canvas element that has an aria-label and role img.
 
</canvas>
 
</canvas>
 
</html>
 
</html>

Latest revision as of 01:11, 9 February 2022

The door opens into a long hallway. Every few steps on either side are barred doors. Moisture drips from the stone walls.

This is some text. This is some text inside a canvas element that has an aria-label. This is some text inside a canvas element that has an aria-label and role img.