Skip to content
Open
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
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
<template>
<router-link :to="clipFolderPath" :class="$style.container">
<AIcon name="bookmark" mdi :class="$style.icon" />
<AIcon
name="bookmark"
mdi
:class="$style.icon"
:data-is-selected="$boolAttr(isSelected)"
Copy link
Contributor

Choose a reason for hiding this comment

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

data-is-selected の代わりに aria-selected を使って,aria-role='tab'aria-controls を指定するといいかも

Copy link
Contributor

@uni-kakurenbo uni-kakurenbo Oct 7, 2025

Choose a reason for hiding this comment

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

aria-controls まで指定しようとすると少々面倒 (PR のスコープ外の差分が大きくなってしまう) かもだから無視でもいいもしれない

/>
<span :class="$style.name">
{{ clipFolder.name }}
</span>
Expand All @@ -12,14 +17,20 @@ import AIcon from '/@/components/UI/AIcon.vue'
import { computed } from 'vue'
import type { ClipFolder } from '@traptitech/traq'
import { constructClipFoldersPath } from '/@/router'
import { useMainViewStore } from '/@/store/ui/mainView'

const props = defineProps<{
clipFolder: ClipFolder
}>()

const { primaryView } = useMainViewStore()
const clipFolderPath = computed(() =>
constructClipFoldersPath(props.clipFolder.id)
)
const isSelected = computed(
() =>
primaryView.value.type === 'clips' &&
props.clipFolder.id === primaryView.value.clipFolderId
)
</script>

<style lang="scss" module>
Expand All @@ -33,6 +44,9 @@ const clipFolderPath = computed(() =>
.icon {
flex-shrink: 0;
margin-right: 16px;
&[data-is-selected] {
@include color-accent-primary;
}
}
.name {
width: 100%;
Expand Down