Skip to content

Conversation

@Haviles04
Copy link
Contributor

@Haviles04 Haviles04 commented Jan 8, 2026

    <Tabs.Root v-model="selected">
      <Tabs.List
        label="Filter"
        class="inline-flex gap-1 p-1 bg-gray-100 dark:bg-gray-800 rounded-lg m-auto"
      >
        <Tabs.Tab
          v-for="tab in ['all', 'active', 'completed']"
          :key="tab"
          v-slot="{ isSelected }"
          :value="tab"
        >
          <button
            class="px-3 py-1.5 text-sm font-medium rounded-md transition-colors"
            :class="
              isSelected
                ? 'bg-white dark:bg-gray-700 text-gray-900 dark:text-white shadow-sm'
                : 'text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white'
            "
          >
            {{ tab.charAt(0).toUpperCase() + tab.slice(1) }}
          </button>
        </Tabs.Tab>
      </Tabs.List>

      <Tabs.Panel value="all" class="mt-4">All items</Tabs.Panel>
      <Tabs.Panel value="active" class="mt-4">Active items</Tabs.Panel>
      <Tabs.Panel value="completed" class="mt-4">Completed items</Tabs.Panel>
    </Tabs.Root>
</template>

<script setup lang="ts">
import { Tabs } from '#v0';

const selected = ref([]);

</script>

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 8, 2026

Open in StackBlitz

commit: 1691d65

@Haviles04 Haviles04 requested a review from johnleider January 8, 2026 23:48
Haviles04 and others added 10 commits January 8, 2026 18:54
Fix inverted condition in TabsPanel that prevented proper ticket lookup by value.
The condition checked for empty results (=== 0) when it should check for matches (> 0),
causing panels to receive incorrect IDs and breaking aria-controls/aria-labelledby
relationships with their corresponding tabs.

Fixes tests:
- "should have correct ARIA attributes"
- "should match aria-controls and aria-labelledby"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant