From 4e94d709b85eec887bf2f39ae4f3057dd67e5868 Mon Sep 17 00:00:00 2001 From: Najika Yoo Date: Fri, 27 Jan 2023 13:35:40 -0800 Subject: [PATCH] fix(table): update element tag in sp table sub components --- packages/table/src/Table.ts | 2 +- packages/table/src/TableBody.ts | 4 ++-- packages/table/src/TableCell.ts | 4 ++-- packages/table/src/TableCheckboxCell.ts | 4 ++-- packages/table/src/TableHead.ts | 4 ++-- packages/table/src/TableHeadCell.ts | 4 ++-- packages/table/src/TableRow.ts | 4 ++-- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/packages/table/src/Table.ts b/packages/table/src/Table.ts index 4104f31498..48f7c38559 100644 --- a/packages/table/src/Table.ts +++ b/packages/table/src/Table.ts @@ -121,7 +121,7 @@ export class Table extends SizedMixin(SpectrumElement, { ) => TemplateResult = /* c8 ignore next */ () => html``; @property({ reflect: true }) - public role = 'grid'; + public override role = 'grid'; /** * Whether the Table allows users to select a row or rows, and thus controls whether or not the Table also renders checkboxes. diff --git a/packages/table/src/TableBody.ts b/packages/table/src/TableBody.ts index 7eec6a1c5f..6d3d6a19c1 100644 --- a/packages/table/src/TableBody.ts +++ b/packages/table/src/TableBody.ts @@ -20,7 +20,7 @@ import styles from './table-body.css.js'; import { MutationController } from '@lit-labs/observers/mutation_controller.js'; /** - * @element sp-table + * @element sp-table-body */ export class TableBody extends SpectrumElement { public static override get styles(): CSSResultArray { @@ -51,7 +51,7 @@ export class TableBody extends SpectrumElement { } @property({ reflect: true }) - public role = 'rowgroup'; + public override role = 'rowgroup'; protected override render(): TemplateResult { return html` diff --git a/packages/table/src/TableCell.ts b/packages/table/src/TableCell.ts index 59f5819a2e..5c6d6cb7bc 100644 --- a/packages/table/src/TableCell.ts +++ b/packages/table/src/TableCell.ts @@ -20,7 +20,7 @@ import { property } from '@spectrum-web-components/base/src/decorators.js'; import styles from './table-cell.css.js'; /** - * @element sp-table + * @element sp-table-cell */ export class TableCell extends SpectrumElement { public static override get styles(): CSSResultArray { @@ -28,7 +28,7 @@ export class TableCell extends SpectrumElement { } @property({ reflect: true }) - public role = 'gridcell'; + public override role = 'gridcell'; protected override render(): TemplateResult { return html` diff --git a/packages/table/src/TableCheckboxCell.ts b/packages/table/src/TableCheckboxCell.ts index e9e1a684b8..1c0a29564b 100644 --- a/packages/table/src/TableCheckboxCell.ts +++ b/packages/table/src/TableCheckboxCell.ts @@ -27,7 +27,7 @@ import styles from './table-checkbox-cell.css.js'; import { Checkbox } from '@spectrum-web-components/checkbox'; /** - * @element sp-table + * @element sp-table-checkbox-cell */ export class TableCheckboxCell extends SpectrumElement { public static override get styles(): CSSResultArray { @@ -35,7 +35,7 @@ export class TableCheckboxCell extends SpectrumElement { } @property({ reflect: true }) - public role = 'gridcell'; + public override role = 'gridcell'; @query('.checkbox') public checkbox!: Checkbox; diff --git a/packages/table/src/TableHead.ts b/packages/table/src/TableHead.ts index b493854998..90cf1ac85c 100644 --- a/packages/table/src/TableHead.ts +++ b/packages/table/src/TableHead.ts @@ -22,7 +22,7 @@ import { TableCheckboxCell } from './TableCheckboxCell.js'; import styles from './table-head.css.js'; /** - * @element sp-table + * @element sp-table-head * */ export class TableHead extends SpectrumElement { @@ -31,7 +31,7 @@ export class TableHead extends SpectrumElement { } @property({ reflect: true }) - public role = 'row'; + public override role = 'row'; @property({ type: Boolean, reflect: true }) public selected?: boolean; diff --git a/packages/table/src/TableHeadCell.ts b/packages/table/src/TableHeadCell.ts index 5c55b09340..abf84a9224 100644 --- a/packages/table/src/TableHeadCell.ts +++ b/packages/table/src/TableHeadCell.ts @@ -36,7 +36,7 @@ const ariaSortValue = (sortDirection?: 'asc' | 'desc'): string => { }; /** - * @element sp-table + * @element sp-table-head-cell * * @fires sorted - Announces that the table head has been sorted and handles the sorted event */ @@ -46,7 +46,7 @@ export class TableHeadCell extends SpectrumElement { } @property({ reflect: true }) - public role = 'columnheader'; + public override role = 'columnheader'; @property({ type: Boolean, reflect: true }) public sortable = false; diff --git a/packages/table/src/TableRow.ts b/packages/table/src/TableRow.ts index b13bdecbf7..a1b948df7f 100644 --- a/packages/table/src/TableRow.ts +++ b/packages/table/src/TableRow.ts @@ -24,7 +24,7 @@ import styles from './table-row.css.js'; import { TableCheckboxCell } from './TableCheckboxCell.js'; /** - * @element sp-table + * @element sp-table-row * * @fires sorted - Announces that `selected` of the table row has changed */ @@ -40,7 +40,7 @@ export class TableRow extends SpectrumElement { checkboxCells!: TableCheckboxCell[]; @property({ reflect: true }) - public role = 'row'; + public override role = 'row'; @property({ type: Boolean }) public selectable = false;