Skip to content

Commit 6595c71

Browse files
committed
fix(a11y): follow the rabbit
1 parent cff4e36 commit 6595c71

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

app/components/Package/TrendsChart.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script setup lang="ts">
22
import type { Theme as VueDataUiTheme, VueUiXyConfig, VueUiXyDatasetItem } from 'vue-data-ui'
33
import { VueUiXy } from 'vue-data-ui/vue-ui-xy'
4-
import { useDebounceFn, useElementSize } from '@vueuse/core'
4+
import { useDebounceFn, useElementSize, useTimeoutFn } from '@vueuse/core'
55
import { useCssVariables } from '~/composables/useColors'
66
import { OKLCH_NEUTRAL_FALLBACK, transparentizeOklch, lightenOklch } from '~/utils/colors'
77
import { getFrameworkColor, isListedFramework } from '~/utils/frameworks'
@@ -1681,6 +1681,8 @@ watch(selectedMetric, value => {
16811681

16821682
<button
16831683
v-if="showResetButton"
1684+
:aria-expanded="showCorrectionControls"
1685+
aria-controls="trends-correction-controls"
16841686
type="button"
16851687
aria-label="Reset date range"
16861688
class="self-end flex items-center justify-center px-2.5 py-2.25 border border-transparent rounded-md text-fg-subtle hover:text-fg transition-colors hover:border-border focus-visible:outline-accent/70 sm:mb-0"
@@ -1706,6 +1708,9 @@ watch(selectedMetric, value => {
17061708
</button>
17071709
<div
17081710
class="overflow-hidden transition-[opacity] duration-200 ease-out"
1711+
id="trends-correction-controls"
1712+
:aria-hidden="!showCorrectionControls"
1713+
:inert="!showCorrectionControls"
17091714
:class="
17101715
showCorrectionControls
17111716
? 'max-h-[220px] opacity-100'

0 commit comments

Comments
 (0)