Skip to content

Commit 19c31f2

Browse files
committed
fix: unneeded code, tests
1 parent 52963f3 commit 19c31f2

File tree

2 files changed

+3
-29
lines changed

2 files changed

+3
-29
lines changed

app/components/Settings/Toggle.client.vue

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -118,31 +118,4 @@ label:has(input:hover) .toggle--background {
118118
.toggle--checkbox:checked.rtl + .toggle--background:before {
119119
transform: translate(-17px);
120120
}
121-
122-
@media (forced-colors: active) {
123-
/* make toggle tracks and thumb visible in forced colors. */
124-
button[role='switch'] {
125-
& > span:last-of-type {
126-
forced-color-adjust: none;
127-
}
128-
129-
&[aria-checked='false'] > span:last-of-type {
130-
background: Canvas;
131-
border-color: CanvasText;
132-
133-
& > span {
134-
background: CanvasText;
135-
}
136-
}
137-
138-
&[aria-checked='true'] > span:last-of-type {
139-
background: Highlight;
140-
border-color: Highlight;
141-
142-
& > span {
143-
background: HighlightText;
144-
}
145-
}
146-
}
147-
}
148121
</style>

test/nuxt/a11y.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2390,7 +2390,7 @@ describe('component accessibility audits', () => {
23902390
describe('Toggle', () => {
23912391
it('should have no accessibility violations', async () => {
23922392
const component = await mountSuspended(SettingsToggle, {
2393-
props: { label: 'Enable feature' },
2393+
props: { label: 'Enable feature', modelValue: false },
23942394
})
23952395
const results = await runAxe(component)
23962396
expect(results.violations).toEqual([])
@@ -2401,6 +2401,7 @@ describe('component accessibility audits', () => {
24012401
props: {
24022402
label: 'Enable feature',
24032403
description: 'This enables the feature',
2404+
modelValue: false,
24042405
},
24052406
})
24062407
const results = await runAxe(component)
@@ -2538,7 +2539,7 @@ describe('background theme accessibility', () => {
25382539
name: 'SettingsToggle',
25392540
mount: () =>
25402541
mountSuspended(SettingsToggle, {
2541-
props: { label: 'Feature', description: 'Desc' },
2542+
props: { label: 'Feature', description: 'Desc', modelValue: false },
25422543
}),
25432544
},
25442545
{

0 commit comments

Comments
 (0)