Skip to content

Commit 0d573f0

Browse files
committed
assign a label
1 parent 2bcb44a commit 0d573f0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/components/TheCycleEdit.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script setup lang="ts">
2-
import { computed, ref, useTemplateRef, watch } from 'vue';
2+
import { computed, ref, useId, useTemplateRef, watch } from 'vue';
33
import IntervalEditBox from '@/components/IntervalEditBox.vue';
44
import BaseButton from '@/components/BaseButton.vue';
55
import BaseIcon from '@/components/BaseIcon.vue';
@@ -11,6 +11,7 @@ import { bool } from 'vue-types';
1111
import { clone } from '@/utils';
1212
1313
const cycle = useCycle();
14+
const id = useId();
1415
1516
const { open } = defineProps({
1617
open: bool().isRequired,
@@ -57,6 +58,7 @@ watch(
5758
<template>
5859
<dialog
5960
ref="dialog"
61+
:aria-labelledby="id + `-title`"
6062
class="m-auto translate-y-2 bg-transparent opacity-0 transition-all transition-discrete duration-500 backdrop:opacity-0 backdrop:transition-all backdrop:transition-discrete backdrop:duration-500 open:translate-0 open:opacity-100 open:backdrop:opacity-100 starting:open:translate-y-2 starting:open:opacity-0 starting:open:backdrop:opacity-0"
6163
@close="close"
6264
>
@@ -67,7 +69,7 @@ watch(
6769
class="w-full rounded-lg border border-blue-200 bg-white px-4 py-2 dark:border-sky-400 dark:bg-stone-800"
6870
@submit="submit"
6971
>
70-
<h1 class="self-center text-lg">
72+
<h1 :id="id + `-title`" class="self-center text-lg">
7173
<BaseIcon name="wrench" class="align-middle" />
7274
Settings
7375
</h1>

0 commit comments

Comments
 (0)