feat(hero): rotate three positioning lines on a 10s cycle
All three lines render in the DOM; CSS drives the fade via data-active. Reduced-motion users see the first line only (no interval, no fade). Rotation pauses on hover and keyboard focus. aria-live=off on the rotator so AT does not announce every swap; aria-hidden flips per-swap to avoid duplicate heading announcements. Also set vite.build.assetsInlineLimit=0 in astro.config.mjs so Astro emits the rotator script as a same-origin external file (dist/assets/) rather than inlining it — required for CSP script-src 'self' compliance.
This commit is contained in:
@@ -19,6 +19,11 @@ export default defineConfig({
|
||||
vite: {
|
||||
build: {
|
||||
cssMinify: 'lightningcss',
|
||||
// Prevent Astro from inlining small scripts into the HTML.
|
||||
// Without this, the hero rotator script (< 4 KB) gets inlined as a
|
||||
// <script type="module"> tag, which violates CSP script-src 'self'
|
||||
// (no 'unsafe-inline'). Setting 0 forces all scripts to external files.
|
||||
assetsInlineLimit: 0,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user