Skip to content

Commit 270f799

Browse files
authored
Merge branch 'main' into main
2 parents fdabb6a + 5e93353 commit 270f799

89 files changed

Lines changed: 2100 additions & 499 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CONTRIBUTING.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,10 +409,10 @@ describe('featureName', () => {
409409
410410
### Component accessibility tests
411411

412-
All new components should have a basic accessibility test in `test/nuxt/components.spec.ts`. These tests use [axe-core](https://github.com/dequelabs/axe-core) to catch common accessibility violations.
412+
All Vue components should have accessibility tests in `test/nuxt/a11y.spec.ts`. These tests use [axe-core](https://github.com/dequelabs/axe-core) to catch common accessibility violations and run in a real browser environment via Playwright.
413413

414414
```typescript
415-
import MyComponent from '~/components/MyComponent.vue'
415+
import { MyComponent } from '#components'
416416

417417
describe('MyComponent', () => {
418418
it('should have no accessibility violations', async () => {
@@ -429,6 +429,8 @@ describe('MyComponent', () => {
429429

430430
The `runAxe` helper handles DOM isolation and disables page-level rules that don't apply to isolated component testing.
431431

432+
A coverage test in `test/unit/a11y-component-coverage.spec.ts` ensures all components are either tested or explicitly skipped with justification. When you add a new component, this test will fail until you add accessibility tests for it.
433+
432434
> [!IMPORTANT]
433435
> Just because axe-core doesn't find any obvious issues, it does not mean a component is accessible. Please do additional checks and use best practices.
434436

app/app.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ if (import.meta.server) {
4242
function handleGlobalKeydown(e: KeyboardEvent) {
4343
if (isEditableElement(e.target)) return
4444
45-
if (e.key === '/') {
45+
if (isKeyWithoutModifiers(e, '/')) {
4646
e.preventDefault()
4747
4848
// Try to find and focus search input on current page
@@ -58,7 +58,7 @@ function handleGlobalKeydown(e: KeyboardEvent) {
5858
router.push('/search')
5959
}
6060
61-
if (e.key === '?') {
61+
if (isKeyWithoutModifiers(e, '?')) {
6262
e.preventDefault()
6363
showKbdHints.value = true
6464
}

app/components/AppHeader.vue

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,23 +62,21 @@ function handleSearchFocus() {
6262
}
6363
6464
onKeyStroke(
65-
',',
65+
e => isKeyWithoutModifiers(e, ',') && !isEditableElement(e.target),
6666
e => {
67-
if (isEditableElement(e.target)) return
68-
6967
e.preventDefault()
7068
navigateTo('/settings')
7169
},
7270
{ dedupe: true },
7371
)
7472
7573
onKeyStroke(
76-
'c',
77-
e => {
74+
e =>
75+
isKeyWithoutModifiers(e, 'c') &&
76+
!isEditableElement(e.target) &&
7877
// Allow more specific handlers to take precedence
79-
if (e.defaultPrevented) return
80-
if (isEditableElement(e.target)) return
81-
78+
!e.defaultPrevented,
79+
e => {
8280
e.preventDefault()
8381
navigateTo('/compare')
8482
},
@@ -140,7 +138,7 @@ onKeyStroke(
140138
:class="{ 'hidden sm:flex': !isSearchExpanded }"
141139
>
142140
<!-- Search bar (hidden on mobile unless expanded) -->
143-
<SearchBox
141+
<HeaderSearchBox
144142
ref="searchBoxRef"
145143
:inputClass="isSearchExpanded ? 'w-full' : ''"
146144
:class="{ 'max-w-md': !isSearchExpanded }"
@@ -219,6 +217,6 @@ onKeyStroke(
219217
</nav>
220218

221219
<!-- Mobile menu -->
222-
<MobileMenu v-model:open="showMobileMenu" />
220+
<HeaderMobileMenu v-model:open="showMobileMenu" />
223221
</header>
224222
</template>

app/components/AuthButton.client.vue

Lines changed: 0 additions & 18 deletions
This file was deleted.

app/components/AuthButton.server.vue

Lines changed: 0 additions & 10 deletions
This file was deleted.

app/components/AuthButton.vue

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)