+
+
+
diff --git a/src/theme/marquee.ts b/src/theme/marquee.ts
index 462ccf2493..93cf33a7ea 100644
--- a/src/theme/marquee.ts
+++ b/src/theme/marquee.ts
@@ -1,7 +1,8 @@
export default {
slots: {
- root: 'group relative flex items-center overflow-hidden gap-(--gap) [--gap:--spacing(16)] [--duration:20s]',
- content: 'flex items-center shrink-0 justify-around gap-(--gap) min-w-max'
+ root: 'group relative flex items-center overflow-hidden gap-(--gap) [--gap:--spacing(16)] motion-reduce:animate-none',
+ content: 'flex items-center shrink-0 justify-around gap-(--gap) min-w-max relative z-0',
+ overlay: 'absolute inset-0 z-10 pointer-events-none opacity-0 group-hover:opacity-100 transition-opacity'
},
variants: {
orientation: {
From 7cae11595f6cb283ca0b4ea15636586a8ac25c79 Mon Sep 17 00:00:00 2001
From: Mohamed Eslam <60846785+MohamedEslam04@users.noreply.github.com>
Date: Sat, 10 Jan 2026 13:59:25 +0200
Subject: [PATCH 3/4] refactor(Marquee): remove redundant comment for duration
prop
---
src/runtime/components/Marquee.vue | 4 ----
1 file changed, 4 deletions(-)
diff --git a/src/runtime/components/Marquee.vue b/src/runtime/components/Marquee.vue
index e56916866b..d8f7ccbd7c 100644
--- a/src/runtime/components/Marquee.vue
+++ b/src/runtime/components/Marquee.vue
@@ -41,10 +41,6 @@ export interface MarqueeProps {
* @defaultValue true
*/
overlay?: boolean
- /**
- * The duration of the marquee animation in seconds.
- * @defaultValue 20
- */
/**
* The duration of the marquee animation in seconds.
* @defaultValue 20
From 47bb87171b65935b839d84f67f05bcfcaa24e27b Mon Sep 17 00:00:00 2001
From: Mohamed Eslam <60846785+MohamedEslam04@users.noreply.github.com>
Date: Sat, 10 Jan 2026 14:27:13 +0200
Subject: [PATCH 4/4] feat(Marquee): implement pauseOnClick functionality and
enhance accessibility with aria attributes
---
test/components/Marquee.spec.ts | 56 ++++++++++
test/components/Slideover.spec.ts | 1 +
.../__snapshots__/Marquee-vue.spec.ts.snap | 103 ++++++++++--------
.../__snapshots__/Marquee.spec.ts.snap | 103 ++++++++++--------
.../__snapshots__/PageLogos-vue.spec.ts.snap | 11 +-
.../__snapshots__/PageLogos.spec.ts.snap | 11 +-
6 files changed, 181 insertions(+), 104 deletions(-)
diff --git a/test/components/Marquee.spec.ts b/test/components/Marquee.spec.ts
index f9b1e51182..0e6402c882 100644
--- a/test/components/Marquee.spec.ts
+++ b/test/components/Marquee.spec.ts
@@ -1,6 +1,7 @@
import { describe, it, expect } from 'vitest'
import { axe } from 'vitest-axe'
import { mountSuspended } from '@nuxt/test-utils/runtime'
+import { h } from 'vue'
import Marquee from '../../src/runtime/components/Marquee.vue'
import type { MarqueeProps, MarqueeSlots } from '../../src/runtime/components/Marquee.vue'
import ComponentRender from '../component-render'
@@ -23,6 +24,61 @@ describe('Marquee', () => {
expect(html).toMatchSnapshot()
})
+ it('handles pauseOnClick correctly', async () => {
+ const wrapper = await mountSuspended(Marquee, {
+ props: {
+ pauseOnClick: true,
+ duration: 30
+ },
+ slots: {
+ default: () => 'Content'
+ }
+ })
+
+ // Check duration style
+ expect(wrapper.attributes('style')).toContain('--duration: 30s')
+
+ // Initial state: not paused
+ expect(wrapper.find('[data-slot="content"]').attributes('style')).toBeUndefined()
+
+ // Check overlay exists and is visible (conditionally based on implementation, here check class or existence)
+ const overlay = wrapper.find('.absolute.inset-0.z-10')
+ expect(overlay.exists()).toBe(true)
+
+ // Click wrapper to pause
+ await wrapper.trigger('click')
+
+ // Paused state
+ expect(wrapper.find('[data-slot="content"]').attributes('style')).toContain('animation-play-state: paused')
+
+ // Overlay should be gone when paused
+ expect(wrapper.find('.absolute.inset-0.z-10').exists()).toBe(false)
+
+ // Click wrapper to resume
+ await wrapper.trigger('click')
+ expect(wrapper.find('[data-slot="content"]').attributes('style')).toBeUndefined()
+ })
+
+ it('prevents pause when clicking interactive elements', async () => {
+ const wrapper = await mountSuspended(Marquee, {
+ props: {
+ pauseOnClick: true,
+ // Reduce repeat to 1 to simplify finding
+ repeat: 1
+ },
+ slots: {
+ default: () => h('button', { id: 'btn' }, 'Click me')
+ }
+ })
+
+ const button = wrapper.find('#btn')
+ expect(button.exists()).toBe(true)
+ await button.trigger('click')
+
+ // Should NOT be paused
+ expect(wrapper.find('[data-slot="content"]').attributes('style')).toBeUndefined()
+ })
+
it('passes accessibility tests', async () => {
const wrapper = await mountSuspended(Marquee, {
slots: {
diff --git a/test/components/Slideover.spec.ts b/test/components/Slideover.spec.ts
index 03257818a9..9645b94c79 100644
--- a/test/components/Slideover.spec.ts
+++ b/test/components/Slideover.spec.ts
@@ -49,5 +49,6 @@ describe('Slideover', () => {
})
expect(await axe(wrapper.element)).toHaveNoViolations()
+ wrapper.unmount()
})
})
diff --git a/test/components/__snapshots__/Marquee-vue.spec.ts.snap b/test/components/__snapshots__/Marquee-vue.spec.ts.snap
index e95b8ccb46..c76ac26894 100644
--- a/test/components/__snapshots__/Marquee-vue.spec.ts.snap
+++ b/test/components/__snapshots__/Marquee-vue.spec.ts.snap
@@ -1,84 +1,93 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`Marquee > renders with as correctly 1`] = `
-"
-
-
-
-
+""
`;
exports[`Marquee > renders with class correctly 1`] = `
-"
-
-
-
-
+"
"
`;
exports[`Marquee > renders with default slot correctly 1`] = `
-"
-
Default slot
-
Default slot
-
Default slot
-
Default slot
+"
+
Default slot
+
Default slot
+
Default slot
+
Default slot
+
"
`;
exports[`Marquee > renders with orientation correctly 1`] = `
-"
-
-
-
-
+"
"
`;
exports[`Marquee > renders with overlay off correctly 1`] = `
-"
-
-
-
-
+"
"
`;
exports[`Marquee > renders with pauseOnHover correctly 1`] = `
-"
-
-
-
-
+"
"
`;
exports[`Marquee > renders with repeat correctly 1`] = `
-"
-
-
-
-
-
-
+"
"
`;
exports[`Marquee > renders with reverse correctly 1`] = `
-"
-
-
-
-
+"
"
`;
exports[`Marquee > renders with ui correctly 1`] = `
-"
-
-
-
-
+"
"
`;
diff --git a/test/components/__snapshots__/Marquee.spec.ts.snap b/test/components/__snapshots__/Marquee.spec.ts.snap
index e95b8ccb46..c76ac26894 100644
--- a/test/components/__snapshots__/Marquee.spec.ts.snap
+++ b/test/components/__snapshots__/Marquee.spec.ts.snap
@@ -1,84 +1,93 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`Marquee > renders with as correctly 1`] = `
-"
-
-
-
-
+""
`;
exports[`Marquee > renders with class correctly 1`] = `
-"
-
-
-
-
+"
"
`;
exports[`Marquee > renders with default slot correctly 1`] = `
-"
-
Default slot
-
Default slot
-
Default slot
-
Default slot
+"
+
Default slot
+
Default slot
+
Default slot
+
Default slot
+
"
`;
exports[`Marquee > renders with orientation correctly 1`] = `
-"
-
-
-
-
+"
"
`;
exports[`Marquee > renders with overlay off correctly 1`] = `
-"
-
-
-
-
+"
"
`;
exports[`Marquee > renders with pauseOnHover correctly 1`] = `
-"
-
-
-
-
+"
"
`;
exports[`Marquee > renders with repeat correctly 1`] = `
-"
-
-
-
-
-
-
+"
"
`;
exports[`Marquee > renders with reverse correctly 1`] = `
-"
-
-
-
-
+"
"
`;
exports[`Marquee > renders with ui correctly 1`] = `
-"
-
-
-
-
+"
"
`;
diff --git a/test/components/__snapshots__/PageLogos-vue.spec.ts.snap b/test/components/__snapshots__/PageLogos-vue.spec.ts.snap
index 927dc56211..b5d1c13676 100644
--- a/test/components/__snapshots__/PageLogos-vue.spec.ts.snap
+++ b/test/components/__snapshots__/PageLogos-vue.spec.ts.snap
@@ -42,11 +42,12 @@ exports[`PageLogos > renders with items correctly 1`] = `
exports[`PageLogos > renders with marquee correctly 1`] = `
"
-
"
`;
diff --git a/test/components/__snapshots__/PageLogos.spec.ts.snap b/test/components/__snapshots__/PageLogos.spec.ts.snap
index 927dc56211..b5d1c13676 100644
--- a/test/components/__snapshots__/PageLogos.spec.ts.snap
+++ b/test/components/__snapshots__/PageLogos.spec.ts.snap
@@ -42,11 +42,12 @@ exports[`PageLogos > renders with items correctly 1`] = `
exports[`PageLogos > renders with marquee correctly 1`] = `
"