diff --git a/libs/components/metadata.json b/libs/components/metadata.json index 6959613ce4..b7e2d699fa 100644 --- a/libs/components/metadata.json +++ b/libs/components/metadata.json @@ -1904,7 +1904,7 @@ }, { "name": "gridTemplateColumns", - "description": "String that gets applied to the the css gridTemplateColumns attribute of child rows", + "description": "String that gets applied to the css gridTemplateColumns attribute of child rows", "type": "string", "attributeName": "grid-template-columns", "propertyName": "gridTemplateColumns" diff --git a/libs/components/src/lib/data-grid/data-grid-cell.spec.ts b/libs/components/src/lib/data-grid/data-grid-cell.spec.ts index 519adc1237..8dc1bc33e5 100644 --- a/libs/components/src/lib/data-grid/data-grid-cell.spec.ts +++ b/libs/components/src/lib/data-grid/data-grid-cell.spec.ts @@ -303,6 +303,14 @@ describe('vwc-data-grid-cell', () => { element.ariaSort = 'none'; }); + it('should have a button role when sorting is enabled', async function () { + element.setAttribute('aria-sort', 'none'); + await elementUpdated(element); + const baseElement = element.shadowRoot?.querySelector('.base'); + + expect(baseElement?.role).toEqual('button'); + }); + it('should show sort-solid icon in the header when "none" is set', async function () { element.setAttribute('aria-sort', 'none'); await elementUpdated(element); diff --git a/libs/components/src/lib/data-grid/data-grid-cell.template.ts b/libs/components/src/lib/data-grid/data-grid-cell.template.ts index 2fa2d1b51b..b6ce2cbbe8 100644 --- a/libs/components/src/lib/data-grid/data-grid-cell.template.ts +++ b/libs/components/src/lib/data-grid/data-grid-cell.template.ts @@ -58,7 +58,10 @@ export const DataGridCellTemplate = ( @click="${(x) => x._handleInteraction()}" @keydown="${(x, c) => handleKeyDown(x, c.event as KeyboardEvent)}" > -
+
${(_) => renderSortIcons(context)}
diff --git a/libs/components/src/lib/data-grid/data-grid.ts b/libs/components/src/lib/data-grid/data-grid.ts index 43bc962912..a5e07892e3 100644 --- a/libs/components/src/lib/data-grid/data-grid.ts +++ b/libs/components/src/lib/data-grid/data-grid.ts @@ -179,7 +179,7 @@ export class DataGrid extends VividElement { } /** - * String that gets applied to the the css gridTemplateColumns attribute of child rows + * String that gets applied to the css gridTemplateColumns attribute of child rows * * @public * @remarks