@@ -237,42 +237,16 @@ describe('WAI ARIA Spec', () => {
237
237
} ) ;
238
238
239
239
describe ( 'WAI-ARIA Roles, States, and Properties' , ( ) => {
240
- it ( `The title of each accordion header is contained in an element with
241
- role button.` , async ( ) => {
242
- // TODO: Use 'title' elements inside the headings.
243
-
244
- const { browser, page, buttonsHandles } = await setup ( ) ;
245
- expect ( buttonsHandles ) . toHaveLength ( 3 ) ;
246
- for ( const buttonHandle of buttonsHandles ) {
247
- expect (
248
- await page . evaluate (
249
- ( button ) => button . getAttribute ( 'role' ) ,
250
- buttonHandle ,
251
- ) ,
252
- ) . toBe ( 'button' ) ;
253
- }
254
- } ) ;
255
-
256
- it ( `Each accordion header button is wrapped in an element with role
257
- heading that has a value set for aria-level that is appropriate for
258
- the information architecture of the page.` , async ( ) => {
259
- const { browser, page, buttonsHandles } = await setup ( ) ;
260
- expect ( buttonsHandles ) . toHaveLength ( 3 ) ;
261
- for ( const buttonHandle of buttonsHandles ) {
262
- expect (
263
- await page . evaluate (
264
- ( button ) => button . parentElement . getAttribute ( 'role' ) ,
265
- buttonHandle ,
266
- ) ,
267
- ) . toBe ( 'heading' ) ;
268
-
240
+ it ( `The title of each accordion header is contained in a heading tag` , async ( ) => {
241
+ const { browser, page, headingsHandles } = await setup ( ) ;
242
+ expect ( headingsHandles ) . toHaveLength ( 3 ) ;
243
+ for ( const headingsHandle of headingsHandles ) {
269
244
expect (
270
245
await page . evaluate (
271
- ( button ) =>
272
- button . parentElement . getAttribute ( 'aria-level' ) ,
273
- buttonHandle ,
246
+ ( heading ) => heading . tagName ,
247
+ headingsHandle ,
274
248
) ,
275
- ) . toBeTruthy ( ) ;
249
+ ) . toContain ( 'H3' ) ;
276
250
}
277
251
} ) ;
278
252
0 commit comments