Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/components/Package/ManagerSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function handleKeydown(event: KeyboardEvent) {
:aria-expanded="isOpen"
aria-haspopup="listbox"
:aria-label="$t('package.get_started.pm_label')"
:aria-controls="listboxId"
:aria-controls="isOpen ? listboxId : undefined"
@click="toggle"
@keydown="handleKeydown"
>
Expand Down
8 changes: 5 additions & 3 deletions app/components/ReadmeTocDropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ function handleKeydown(event: KeyboardEvent) {
:aria-expanded="isOpen"
aria-haspopup="listbox"
:aria-label="$t('package.readme.toc_title')"
:aria-controls="listboxId"
:aria-controls="isOpen ? listboxId : undefined"
@click="toggle"
@keydown="handleKeydown"
classicon="i-lucide:list"
Expand Down Expand Up @@ -180,7 +180,9 @@ function handleKeydown(event: KeyboardEvent) {
ref="listRef"
role="listbox"
:aria-activedescendant="
highlightedIndex >= 0 ? `${listboxId}-${toc[highlightedIndex]?.id}` : undefined
highlightedIndex >= 0 && toc[highlightedIndex]?.id
? `${listboxId}-${toc[highlightedIndex]?.id}`
: undefined
"
:aria-label="$t('package.readme.toc_title')"
:style="getDropdownStyle()"
Expand Down Expand Up @@ -231,7 +233,7 @@ function handleKeydown(event: KeyboardEvent) {
:aria-selected="activeId === grandchild.id"
class="flex items-center gap-2 px-3 py-1.5 ps-9 text-sm cursor-pointer transition-colors duration-150"
:class="[
activeId === grandchild.id ? 'text-fg font-medium' : 'text-fg-subtle',
grandchild.id === activeId ? 'text-fg font-medium' : 'text-fg-subtle',
highlightedIndex === getIndex(grandchild.id)
? 'bg-bg-elevated'
: 'hover:bg-bg-elevated',
Expand Down
5 changes: 4 additions & 1 deletion nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,10 @@ export default defineNuxtConfig({
htmlValidator: {
enabled: !isCI || (provider !== 'vercel' && !!process.env.VALIDATE_HTML),
options: {
rules: { 'meta-refresh': 'off' },
rules: {
'meta-refresh': 'off',
'prefer-native-element': ['error', { exclude: ['listbox'] }],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 Per https://discord.com/channels/1464542801676206113/1464926468751753269/1471511992434163844, I think if anything we'd want exactly the opposite (include), wouldn't we? As is this would suppress warnings about role=listbox, which we do want to eliminate.

},
},
failOnError: true,
},
Expand Down
Loading