Skip to content

Commit

Permalink
fixed firefox accessibility issues
Browse files Browse the repository at this point in the history
  • Loading branch information
BabyElias committed Jul 11, 2024
1 parent e897a71 commit 091e7f2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/KTable/KTableGridItem.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>

<td :style="{ textAlign: textAlign }" tabindex="0" @keydown="onKeydown">
<td :style="{ textAlign: textAlign }" tabindex="0" role="gridcell" @keydown="onKeydown">
<slot :content="content">
{{ content }}
</slot>
Expand Down
6 changes: 5 additions & 1 deletion lib/KTable/index.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>

<div class="k-table">
<div class="k-table" role="grid">
<table>
<caption v-if="caption">
{{ caption }}
Expand All @@ -13,6 +13,8 @@
tabindex="0"
:aria-sort="sortable && header.dataType !== DATA_TYPE_OTHERS ? getAriaSort(index) : null"
:class="{ sortable: sortable && header.dataType !== DATA_TYPE_OTHERS }"
role="columnheader"
aria-colindex="index + 1"
@click="sortable && header.dataType !== DATA_TYPE_OTHERS ? handleSort(index) : null"
@keydown="handleKeydown($event, -1, index)"
>
Expand All @@ -36,6 +38,8 @@
:dataType="headers[colIndex].dataType"
:rowIndex="rowIndex"
:colIndex="colIndex"
role="gridcell"
aria-colindex="colIndex + 1"
@keydown="handleKeydown($event, rowIndex, colIndex)"
>
<template #default="slotProps">
Expand Down

0 comments on commit 091e7f2

Please sign in to comment.