Read This First
No ARIA is better than Bad ARIA. Before using any ARIA, read this to understand why.
'use strict'; /** * Inserts the "Read This First" banner from /content/shared/templates/read-this-first.html into * pages after the h1 element when the DOM is loaded. The banner is configured using data * attributes on the script element. * * USAGE: * Add this script to your HTML page with the appropriate data attributes: * * * * CONFIGURATION OPTIONS: * - showImage: boolean (default: true) - Controls whether the illustration image is displayed * * BEHAVIOR: * - Banner is inserted after the h1 element when DOM is loaded * - If template file can't be fetched (e.g., CORS issues with file:// protocol), uses fallback * - Paths are automatically adjusted based on script location * - Image can be conditionally removed based on showImage setting */ (function () { const defaultConfig = { showImage: true, }; // NOTE: If /content/shared/templates/read-this-first.html is ever changed, update this fallback banner to match // MUST HAVE `div class="read-this-first"` const fallbackBanner = `
No ARIA is better than Bad ARIA. Before using any ARIA, read this to understand why.