@@ -161,6 +161,15 @@ const hasMinimap = computed<boolean>(() => {
161161const chartConfig = computed <VueUiXyConfig >(() => {
162162 return {
163163 theme: isDarkMode .value ? ' dark' : ' ' ,
164+ a11y: {
165+ translations: {
166+ keyboardNavigation: $t (
167+ ' package.trends.chart_assistive_text.keyboard_navigation_horizontal' ,
168+ ),
169+ tableAvailable: $t (' package.trends.chart_assistive_text.table_available' ),
170+ tableCaption: $t (' package.trends.chart_assistive_text.table_caption' ),
171+ },
172+ },
164173 chart: {
165174 title: {
166175 text: dateRangeLabel .value ,
@@ -447,6 +456,13 @@ const chartConfig = computed<VueUiXyConfig>(() => {
447456 <ClientOnly v-if =" xyDataset.length > 0 && !error" >
448457 <div class =" chart-container w-full" :key =" groupingMode" >
449458 <VueUiXy :dataset =" xyDataset" :config =" chartConfig" class =" [direction:ltr]" >
459+ <!-- Keyboard navigation hint -->
460+ <template #hint =" { isVisible } " >
461+ <p v-if =" isVisible" class =" text-accent text-xs -mt-6 text-center" aria-hidden =" true" >
462+ {{ $t('compare.packages.line_chart_nav_hint') }}
463+ </p >
464+ </template >
465+
450466 <!-- Injecting custom svg elements -->
451467 <template #svg =" { svg } " >
452468 <!-- Inject legend during SVG print only -->
@@ -664,6 +680,18 @@ const chartConfig = computed<VueUiXyConfig>(() => {
664680:deep(.vue-ui-xy ) svg rect {
665681 transition : none !important ;
666682}
683+
684+ :deep(.vue-data-ui-component svg :focus-visible ) {
685+ outline : 1px solid var (--accent-color ) !important ;
686+ border-radius : 0.1rem ;
687+ outline-offset : 0 !important ;
688+ }
689+
690+ :deep(.vue-ui-user-options-button :focus-visible ),
691+ :deep(.vue-ui-user-options :first-child:focus-visible ) {
692+ outline : 0.1rem solid var (--accent-color ) !important ;
693+ border-radius : 0.25rem ;
694+ }
667695 </style >
668696
669697<style >
0 commit comments