Scrawl-canvas v8 - Canvas test 033

User preferences: prefers-color-scheme; prefers-reduced-motion; Javascript disabled

This canvas is resizable - drag the bottom right corner to change its dimensions.

This content will visually appear when Javascript is disabled, and should be used to describe what the canvas would be showing had JS been working. Also include any relevant links in this copy. Be aware that this text will display over the background image, so needs some styling to show up more clearly. Remember, if JS has been disabled, then text included in Phrase entitys and Anchor objects will not be processed and exposed in the canvas's sub-DOM! Note that Scrawl-canvas appends sub-DOM data/copy, so this paragraph will be the first canvas-related thing a screen reader encounters - unless we get the script snippet to add aria-hidden="true" as an attribute to this element.

Test purpose

To toggle user preferences in Chrome: open the Inspector, press Ctrl/Cmd+Shift+P, type 'show rendering', click on the 'Show rendering' button.

This demo also includes HTML/CSS code for action to take when Javascript has been disabled on a page. Specifically, a background image will be displayed in the canvas (via CSS) unless a <script> tag in the HTML immediately following the <canvas> element runs - the code removes a class from the canvas element, which prevents the background image displaying. Test this by disabling Javascript in the browser and then reloading the demo.

Annotated code