diff --git a/src/runtime/components/Table.vue b/src/runtime/components/Table.vue index 1c7d608153..af85b51328 100644 --- a/src/runtime/components/Table.vue +++ b/src/runtime/components/Table.vue @@ -354,6 +354,7 @@ defineExpose({ v-for="header in headerGroup.headers" :key="header.id" :data-pinned="header.column.getIsPinned()" + :scope="header.colSpan > 1 ? 'colgroup' : 'col'" :colspan="header.colSpan > 1 ? header.colSpan : undefined" :class="ui.th({ class: [ diff --git a/test/components/__snapshots__/Table-vue.spec.ts.snap b/test/components/__snapshots__/Table-vue.spec.ts.snap index d6505c4f50..44103171e8 100644 --- a/test/components/__snapshots__/Table-vue.spec.ts.snap +++ b/test/components/__snapshots__/Table-vue.spec.ts.snap @@ -6,10 +6,10 @@ exports[`Table > renders with as correctly 1`] = ` - Id - Amount - Status - Email + Id + Amount + Status + Email @@ -60,10 +60,10 @@ exports[`Table > renders with body-bottom slot correctly 1`] = ` - Id - Amount - Status - Email + Id + Amount + Status + Email @@ -114,10 +114,10 @@ exports[`Table > renders with body-top slot correctly 1`] = ` - Id - Amount - Status - Email + Id + Amount + Status + Email @@ -167,10 +167,10 @@ exports[`Table > renders with caption correctly 1`] = ` Table caption - Id - Amount - Status - Email + Id + Amount + Status + Email @@ -221,10 +221,10 @@ exports[`Table > renders with caption slot correctly 1`] = ` Caption slot - Id - Amount - Status - Email + Id + Amount + Status + Email @@ -275,10 +275,10 @@ exports[`Table > renders with cell slot correctly 1`] = ` - Id - Amount - Status - Email + Id + Amount + Status + Email @@ -329,10 +329,10 @@ exports[`Table > renders with class correctly 1`] = ` - Id - Amount - Status - Email + Id + Amount + Status + Email @@ -383,7 +383,7 @@ exports[`Table > renders with columns correctly 1`] = ` - +
- # - Date - Status - - +
Amount
- + @@ -574,10 +574,10 @@ exports[`Table > renders with data correctly 1`] = ` - Id - Amount - Status - Email + Id + Amount + Status + Email @@ -645,7 +645,7 @@ exports[`Table > renders with empty slot correctly 1`] = ` - +
- # - Date - Status - - +
Amount
- + @@ -684,10 +684,10 @@ exports[`Table > renders with expanded slot correctly 1`] = ` - Id - Amount - Status - Email + Id + Amount + Status + Email @@ -738,10 +738,10 @@ exports[`Table > renders with header slot correctly 1`] = ` - ID Header slot - Amount - Status - Email + ID Header slot + Amount + Status + Email @@ -792,10 +792,10 @@ exports[`Table > renders with loading animation carousel correctly 1`] = ` - Id - Amount - Status - Email + Id + Amount + Status + Email @@ -846,10 +846,10 @@ exports[`Table > renders with loading animation carousel-inverse correctly 1`] = - Id - Amount - Status - Email + Id + Amount + Status + Email @@ -900,10 +900,10 @@ exports[`Table > renders with loading animation elastic correctly 1`] = ` - Id - Amount - Status - Email + Id + Amount + Status + Email @@ -954,10 +954,10 @@ exports[`Table > renders with loading animation swing correctly 1`] = ` - Id - Amount - Status - Email + Id + Amount + Status + Email @@ -1008,10 +1008,10 @@ exports[`Table > renders with loading color error correctly 1`] = ` - Id - Amount - Status - Email + Id + Amount + Status + Email @@ -1062,10 +1062,10 @@ exports[`Table > renders with loading color info correctly 1`] = ` - Id - Amount - Status - Email + Id + Amount + Status + Email @@ -1116,10 +1116,10 @@ exports[`Table > renders with loading color neutral correctly 1`] = ` - Id - Amount - Status - Email + Id + Amount + Status + Email @@ -1170,10 +1170,10 @@ exports[`Table > renders with loading color primary correctly 1`] = ` - Id - Amount - Status - Email + Id + Amount + Status + Email @@ -1224,10 +1224,10 @@ exports[`Table > renders with loading color secondary correctly 1`] = ` - Id - Amount - Status - Email + Id + Amount + Status + Email @@ -1278,10 +1278,10 @@ exports[`Table > renders with loading color success correctly 1`] = ` - Id - Amount - Status - Email + Id + Amount + Status + Email @@ -1332,10 +1332,10 @@ exports[`Table > renders with loading color warning correctly 1`] = ` - Id - Amount - Status - Email + Id + Amount + Status + Email @@ -1386,10 +1386,10 @@ exports[`Table > renders with loading correctly 1`] = ` - Id - Amount - Status - Email + Id + Amount + Status + Email @@ -1440,7 +1440,7 @@ exports[`Table > renders with loading slot correctly 1`] = ` - +
- # - Date - Status - - +
Amount
- + @@ -1479,10 +1479,10 @@ exports[`Table > renders with sticky correctly 1`] = ` - Id - Amount - Status - Email + Id + Amount + Status + Email @@ -1533,10 +1533,10 @@ exports[`Table > renders with ui correctly 1`] = ` - Id - Amount - Status - Email + Id + Amount + Status + Email diff --git a/test/components/__snapshots__/Table.spec.ts.snap b/test/components/__snapshots__/Table.spec.ts.snap index 0238ed89af..5df99bd247 100644 --- a/test/components/__snapshots__/Table.spec.ts.snap +++ b/test/components/__snapshots__/Table.spec.ts.snap @@ -6,10 +6,10 @@ exports[`Table > renders with as correctly 1`] = ` - Id - Amount - Status - Email + Id + Amount + Status + Email @@ -60,10 +60,10 @@ exports[`Table > renders with body-bottom slot correctly 1`] = ` - Id - Amount - Status - Email + Id + Amount + Status + Email @@ -114,10 +114,10 @@ exports[`Table > renders with body-top slot correctly 1`] = ` - Id - Amount - Status - Email + Id + Amount + Status + Email @@ -167,10 +167,10 @@ exports[`Table > renders with caption correctly 1`] = ` Table caption - Id - Amount - Status - Email + Id + Amount + Status + Email @@ -221,10 +221,10 @@ exports[`Table > renders with caption slot correctly 1`] = ` Caption slot - Id - Amount - Status - Email + Id + Amount + Status + Email @@ -275,10 +275,10 @@ exports[`Table > renders with cell slot correctly 1`] = ` - Id - Amount - Status - Email + Id + Amount + Status + Email @@ -329,10 +329,10 @@ exports[`Table > renders with class correctly 1`] = ` - Id - Amount - Status - Email + Id + Amount + Status + Email @@ -383,7 +383,7 @@ exports[`Table > renders with columns correctly 1`] = ` - +
- # - Date - Status - - +
Amount
- + @@ -574,10 +574,10 @@ exports[`Table > renders with data correctly 1`] = ` - Id - Amount - Status - Email + Id + Amount + Status + Email @@ -645,7 +645,7 @@ exports[`Table > renders with empty slot correctly 1`] = ` - +
- # - Date - Status - - +
Amount
- + @@ -684,10 +684,10 @@ exports[`Table > renders with expanded slot correctly 1`] = ` - Id - Amount - Status - Email + Id + Amount + Status + Email @@ -738,10 +738,10 @@ exports[`Table > renders with header slot correctly 1`] = ` - ID Header slot - Amount - Status - Email + ID Header slot + Amount + Status + Email @@ -792,10 +792,10 @@ exports[`Table > renders with loading animation carousel correctly 1`] = ` - Id - Amount - Status - Email + Id + Amount + Status + Email @@ -846,10 +846,10 @@ exports[`Table > renders with loading animation carousel-inverse correctly 1`] = - Id - Amount - Status - Email + Id + Amount + Status + Email @@ -900,10 +900,10 @@ exports[`Table > renders with loading animation elastic correctly 1`] = ` - Id - Amount - Status - Email + Id + Amount + Status + Email @@ -954,10 +954,10 @@ exports[`Table > renders with loading animation swing correctly 1`] = ` - Id - Amount - Status - Email + Id + Amount + Status + Email @@ -1008,10 +1008,10 @@ exports[`Table > renders with loading color error correctly 1`] = ` - Id - Amount - Status - Email + Id + Amount + Status + Email @@ -1062,10 +1062,10 @@ exports[`Table > renders with loading color info correctly 1`] = ` - Id - Amount - Status - Email + Id + Amount + Status + Email @@ -1116,10 +1116,10 @@ exports[`Table > renders with loading color neutral correctly 1`] = ` - Id - Amount - Status - Email + Id + Amount + Status + Email @@ -1170,10 +1170,10 @@ exports[`Table > renders with loading color primary correctly 1`] = ` - Id - Amount - Status - Email + Id + Amount + Status + Email @@ -1224,10 +1224,10 @@ exports[`Table > renders with loading color secondary correctly 1`] = ` - Id - Amount - Status - Email + Id + Amount + Status + Email @@ -1278,10 +1278,10 @@ exports[`Table > renders with loading color success correctly 1`] = ` - Id - Amount - Status - Email + Id + Amount + Status + Email @@ -1332,10 +1332,10 @@ exports[`Table > renders with loading color warning correctly 1`] = ` - Id - Amount - Status - Email + Id + Amount + Status + Email @@ -1386,10 +1386,10 @@ exports[`Table > renders with loading correctly 1`] = ` - Id - Amount - Status - Email + Id + Amount + Status + Email @@ -1440,7 +1440,7 @@ exports[`Table > renders with loading slot correctly 1`] = ` - +
- # - Date - Status - - +
Amount
- + @@ -1479,10 +1479,10 @@ exports[`Table > renders with sticky correctly 1`] = ` - Id - Amount - Status - Email + Id + Amount + Status + Email @@ -1533,10 +1533,10 @@ exports[`Table > renders with ui correctly 1`] = ` - Id - Amount - Status - Email + Id + Amount + Status + Email