diff --git a/examples/table/table.html b/examples/table/table.html index 85b65ad81d..92af2a88d1 100644 --- a/examples/table/table.html +++ b/examples/table/table.html @@ -42,7 +42,7 @@

Example

-
Students currently enrolled in WAI-ARIA 101 for the coming semester
+
Students currently enrolled in WAI-ARIA 101 for the coming semester
First Name @@ -121,6 +121,12 @@

Role, Property, State, and Tabindex Attributes

div Refers to the element that serves as the caption for the table. + + caption + + div + The element containing a description of the table contents. + rowgroup diff --git a/test/tests/table_table.js b/test/tests/table_table.js index afb56bedca..121c6a936a 100644 --- a/test/tests/table_table.js +++ b/test/tests/table_table.js @@ -29,9 +29,12 @@ ariaTest('"aria-describedby" attribute on table element', exampleFile, 'table-ar await assertAriaDescribedby(t, ex.tableSelector); }); +ariaTest('role="caption" element exists', exampleFile, 'caption-role', async (t) => { + await assertAriaRoles(t, 'ex1', 'caption', 1, 'div'); +}); ariaTest('role="rowgroup" exists', exampleFile, 'rowgroup-role', async (t) => { - + const rowgroups = await t.context.queryElements(t, ex.tableSelector + ' [role="rowgroup"]'); t.is( @@ -43,7 +46,7 @@ ariaTest('role="rowgroup" exists', exampleFile, 'rowgroup-role', async (t) => { ariaTest('role="row" exists', exampleFile, 'row-role', async (t) => { - + const rows = await t.context.queryElements(t, ex.tableSelector + ' [role="rowgroup"] [role="row"]'); t.is( @@ -55,7 +58,7 @@ ariaTest('role="row" exists', exampleFile, 'row-role', async (t) => { ariaTest('role="columnheader" exists', exampleFile, 'columnheader-role', async (t) => { - + const columnheaders = await t.context.queryElements(t, ex.tableSelector + ' [role="rowgroup"] [role="row"] [role="columnheader"]'); t.is( @@ -67,7 +70,7 @@ ariaTest('role="columnheader" exists', exampleFile, 'columnheader-role', async ( }); ariaTest('role="cell" exists', exampleFile, 'cell-role', async (t) => { - + const cells = await t.context.queryElements(t, ex.tableSelector + ' [role="rowgroup"] [role="row"] [role="cell"]'); t.is(