Canvas Fallback Content Note
Determines canvas fallback in interactive visual media from caller-supplied canvas support and scripting state. Disabled scripting or disabled canvas support displays fallback. Printing/static media and accessibility subtree behavior are outside this profile.
Description
Canvas offers bitmap drawing with fallback content.
Canvas offers bitmap drawing with fallback content. In interactive visual media, disabled scripting or unavailable canvas support can make fallback relevant.1
Determines canvas fallback in interactive visual media from caller-supplied canvas support and scripting state. Disabled scripting or disabled canvas support displays fallback. Printing/static media and accessibility subtree behavior are outside this profile.
When to use Canvas Fallback Content Note
Use this for the following task: Determines canvas fallback in interactive visual media from caller-supplied canvas support and scripting state. Disabled scripting or disabled canvas support displays fallback. Printing/static media and accessibility subtree behavior are outside this profile.
Prepare the parsed attribute values, element states or ordered local lists requested below. Keep attribute presence separate from value.
How to use Canvas Fallback Content Note and understand its results
- Prepare the parsed attribute values, element states or ordered local lists requested below. Keep attribute presence separate from value.
- Enter canvasSupported, scriptingEnabled using the field table, then run the tool.
- Read visualFallback, scriptsCanDraw. Interpret flags, units, ordering and placeholder values using the rules below.
- Review any reported issue or failed check, correct the supplied values when appropriate, and verify the result in its intended context.
| Input field | Meaning | Value type and bounds | Requirement |
|---|---|---|---|
| canvasSupported | Canvas Supported | boolean | Required |
| scriptingEnabled | Scripting Enabled | boolean | Required |
Supply support and scripting flags for the intended environment, then inspect fallback and drawing eligibility.2
visualFallback = !canvasSupported OR !scriptingEnabled; scriptsCanDraw = both true This summarizes the declared operation. Units, indexing, inclusivity and exceptional cases are explained in the surrounding text.
| Output field | Meaning | Value type |
|---|---|---|
| visualFallback | Visual Fallback | boolean |
| scriptsCanDraw | Scripts Can Draw | boolean |
{
"input": {
"canvasSupported": true,
"scriptingEnabled": false
},
"output": {
"visualFallback": true,
"scriptsCanDraw": false
}
} Limitations and assumptions
Static/printing media and accessibility subtree behavior are excluded. Eligible drawing does not mean a script actually drew anything.
This evaluates supplied local information; it does not fetch a page or run a browser. Malformed requests produce input errors. A successfully evaluated request can still contain false flags, empty result lists or a result outside the supplied threshold; those outcomes have the meanings stated above.
Alternative or Complementary methods
Choose noscript JS-Disabled Fallback for this operation: Resolves HTML noscript fallback and parser treatment from the HTML parser scripting flag. With scripting enabled contents are text; with scripting disabled contents are markup. XML parsing and full content-model validation are outside this tool. For a complementary task, use template Inert Content Note for this operation: Classifies ordinary template DocumentFragment contents versus content already inserted into a document or a processed declarative shadow root. Only ordinary template contents remain in the inert template owner document; other reasons for inertness are not evaluated.
Further background: HTML / accessibility reference: Canvas Fallback Content Note.
References
Similar or alternative tools
- noscript JS-Disabled Fallback
Resolves HTML noscript fallback and parser treatment from the HTML parser scripting flag. With scripting enabled contents are text; with scripting disabled contents are markup. XML parsing and full content-model validation are outside this tool.
- template Inert Content Note
Classifies ordinary template DocumentFragment contents versus content already inserted into a document or a processed declarative shadow root. Only ordinary template contents remain in the inert template owner document; other reasons for inertness are not evaluated.