diff options
author | 2023-10-15 23:41:55 +0200 | |
---|---|---|
committer | 2023-10-15 23:41:55 +0200 | |
commit | b408df82c1d8a0123e552048421b37afcf5189c6 (patch) | |
tree | 22c632236e04da45edd40a9ba00c5864b9dcac3e /src | |
parent | 88b881880c0b307e3a0c1954dc2f5474f39a144b (diff) | |
download | it-tools-b408df82c1d8a0123e552048421b37afcf5189c6.tar.gz it-tools-b408df82c1d8a0123e552048421b37afcf5189c6.tar.zst it-tools-b408df82c1d8a0123e552048421b37afcf5189c6.zip |
refactor(c-table): added description on c-table for accessibility
Diffstat (limited to 'src')
-rw-r--r-- | src/ui/c-table/c-table.vue | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ui/c-table/c-table.vue b/src/ui/c-table/c-table.vue index 9f734a9..9354cc9 100644 --- a/src/ui/c-table/c-table.vue +++ b/src/ui/c-table/c-table.vue @@ -2,7 +2,7 @@ import _ from 'lodash'; import type { HeaderConfiguration } from './c-table.types'; -const props = withDefaults(defineProps<{ data?: Record<string, unknown>[]; headers?: HeaderConfiguration ; hideHeaders?: boolean }>(), { data: () => [], headers: undefined, hideHeaders: false }); +const props = withDefaults(defineProps<{ data?: Record<string, unknown>[]; headers?: HeaderConfiguration ; hideHeaders?: boolean; description?: string }>(), { data: () => [], headers: undefined, hideHeaders: false, description: 'Data table' }); const { data, headers: rawHeaders, hideHeaders } = toRefs(props); const headers = computed(() => { @@ -38,7 +38,7 @@ const headers = computed(() => { <template> <div class="relative overflow-x-auto rounded"> - <table class="w-full border-collapse text-left text-sm text-gray-500 dark:text-gray-400"> + <table class="w-full border-collapse text-left text-sm text-gray-500 dark:text-gray-400" role="table" :aria-label="description"> <thead v-if="!hideHeaders" class="bg-#ffffff uppercase text-gray-700 dark:bg-#333333 dark:text-gray-400"> <tr> <th v-for="header in headers" :key="header.key" scope="col" class="px-6 py-3 text-xs"> |