File tree 2 files changed +3
-35
lines changed
2 files changed +3
-35
lines changed Original file line number Diff line number Diff line change @@ -163,36 +163,6 @@ describe('table', async() => {
163
163
}
164
164
} )
165
165
166
- it ( 'all example tables should have ARIA role="grid"' , async ( ) => {
167
- const { app : { $refs, $el } } = window
168
-
169
- const tables = [ 'table_basic' , 'table_paginated' , 'table_inverse' ]
170
-
171
- tables . forEach ( table => {
172
- expect ( $refs [ table ] . $el . getAttribute ( 'role' ) ) . toBe ( 'grid' )
173
- } )
174
- } )
175
-
176
- it ( 'each data row should have ARIA role "row"' , async ( ) => {
177
- const { app : { $refs, $el } } = window
178
- const app = window . app
179
-
180
- const tables = [ 'table_basic' , 'table_paginated' , 'table_inverse' ]
181
-
182
- tables . forEach ( table => {
183
- const vm = $refs [ table ]
184
- const tbody = [ ...vm . $el . children ] . find ( el => el && el . tagName === 'TBODY' )
185
- expect ( tbody ) . toBeDefined ( )
186
- if ( tbody ) {
187
- const trs = [ ...tbody . children ]
188
- expect ( trs . length ) . toBe ( vm . perPage || app . items . length )
189
- trs . forEach ( tr => {
190
- expect ( tr . getAttribute ( 'role' ) ) . toBe ( 'row' )
191
- } )
192
- }
193
- } )
194
- } )
195
-
196
166
it ( 'all example tables should have attribute aria-busy="false" when busy is false' , async ( ) => {
197
167
const { app : { $refs, $el } } = window
198
168
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<table :id =" id || null"
3
- role =" grid"
4
3
:aria-busy =" busy ? 'true' : 'false'"
5
4
:class =" tableClass"
6
5
>
7
6
<thead :class =" headClass" >
8
- <tr role = " row " >
7
+ <tr >
9
8
<th v-for =" (field,key) in fields"
10
9
@click.stop.prevent =" headClicked($event,field,key)"
11
10
@keydown.enter.stop.prevent =" headClicked($event,field,key)"
24
23
</tr >
25
24
</thead >
26
25
<tfoot v-if =" footClone" :class =" footClass" >
27
- <tr role = " row " >
26
+ <tr >
28
27
<th v-for =" (field,key) in fields"
29
28
@click.stop.prevent =" headClicked($event,field,key)"
30
29
@keydown.enter.stop.prevent =" headClicked($event,field,key)"
47
46
</tfoot >
48
47
<tbody >
49
48
<tr v-for =" (item,index) in _items"
50
- role =" row"
51
49
:key =" index"
52
50
:class =" rowClass(item)"
53
51
@click =" rowClicked($event,item,index)"
57
55
<slot :name =" key" :value =" item[key]" :item =" item" :index =" index" >{{item[key]}}</slot >
58
56
</td >
59
57
</tr >
60
- <tr v-if =" showEmpty && (!_items || _items.length === 0)" role = " row " >
58
+ <tr v-if =" showEmpty && (!_items || _items.length === 0)" >
61
59
<td :colspan =" Object.keys(fields).length" >
62
60
<div v-if =" filter" role =" alert" aria-live =" polite" >
63
61
<slot name =" emptyfiltered" >
You can’t perform that action at this time.
0 commit comments