diff --git a/src/components/action-group/__snapshots__/action-group.spec.snap.js b/src/components/action-group/__snapshots__/action-group.spec.snap.js index b20e5791f8..14aa4f73ff 100644 --- a/src/components/action-group/__snapshots__/action-group.spec.snap.js +++ b/src/components/action-group/__snapshots__/action-group.spec.snap.js @@ -30,9 +30,7 @@ snapshots["sbb-action-group renders renders - Dom"] = href="https://github.com/lyne-design-system/lyne-components" icon-name="chevron-small-left-small" icon-placement="start" - role="link" size="m" - tabindex="0" > Link @@ -60,13 +58,7 @@ snapshots["sbb-action-group renders A11y tree Chrome"] = }, { "role": "link", - "name": "Link", - "children": [ - { - "role": "link", - "name": "Link" - } - ] + "name": "Link" } ] } @@ -87,13 +79,7 @@ snapshots["sbb-action-group renders A11y tree Firefox"] = { "role": "link", "name": "Link", - "children": [ - { - "role": "link", - "name": "Link", - "value": "https://github.com/lyne-design-system/lyne-components" - } - ] + "value": "https://github.com/lyne-design-system/lyne-components" } ] } diff --git a/src/components/alert/alert-group/__snapshots__/alert-group.spec.snap.js b/src/components/alert/alert-group/__snapshots__/alert-group.spec.snap.js index 6bd037fc8f..99952b64a1 100644 --- a/src/components/alert/alert-group/__snapshots__/alert-group.spec.snap.js +++ b/src/components/alert/alert-group/__snapshots__/alert-group.spec.snap.js @@ -55,13 +55,7 @@ snapshots["sbb-alert-group should render A11y tree Chrome"] = }, { "role": "link", - "name": "Find out more", - "children": [ - { - "role": "link", - "name": "Find out more" - } - ] + "name": "Find out more" }, { "role": "button", @@ -96,13 +90,7 @@ snapshots["sbb-alert-group should render A11y tree Firefox"] = { "role": "link", "name": "Find out more", - "children": [ - { - "role": "link", - "name": "Find out more", - "value": "https://www.sbb.ch/" - } - ] + "value": "https://www.sbb.ch/" }, { "role": "button", diff --git a/src/components/alert/alert/__snapshots__/alert.spec.snap.js b/src/components/alert/alert/__snapshots__/alert.spec.snap.js index 16e243cb5a..4777002ef5 100644 --- a/src/components/alert/alert/__snapshots__/alert.spec.snap.js +++ b/src/components/alert/alert/__snapshots__/alert.spec.snap.js @@ -97,7 +97,7 @@ snapshots["sbb-alert should render customized properties"] =
+ { + "role": "WebArea", + "name": "", + "children": [ + { + "role": "button", + "name": "a11y label" + } + ] +} +
+`; +/* end snapshot sbb-menu-button renders A11y tree Chrome */ + +snapshots["sbb-menu-button renders component with icon and amount Light DOM"] = +`+ { + "role": "document", + "name": "", + "children": [ + { + "role": "button", + "name": "a11y label" + } + ] +} +
+`; +/* end snapshot sbb-menu-button renders A11y tree Firefox */ + diff --git a/src/components/menu/menu-button/menu-button.spec.ts b/src/components/menu/menu-button/menu-button.spec.ts index 677158e99e..d0f5ea950a 100644 --- a/src/components/menu/menu-button/menu-button.spec.ts +++ b/src/components/menu/menu-button/menu-button.spec.ts @@ -1,70 +1,52 @@ import { expect } from '@open-wc/testing'; import { html } from 'lit/static-html.js'; -import { fixture } from '../../core/testing/private.js'; +import { fixture, testA11yTreeSnapshot } from '../../core/testing/private.js'; + +import type { SbbMenuButtonElement } from './menu-button.js'; import './menu-button.js'; describe(`sbb-menu-button`, () => { - it('renders', async () => { - const root = await fixture(html` -+ { + "role": "WebArea", + "name": "", + "children": [ + { + "role": "link", + "name": "a11y label" + } + ] +} +
+`; +/* end snapshot sbb-menu-link renders component with icon and amount A11y tree Chrome */ + +snapshots["sbb-menu-link renders component with icon and amount A11y tree Firefox"] = +`+ { + "role": "document", + "name": "", + "children": [ + { + "role": "link", + "name": "a11y label", + "value": "https://github.com/lyne-design-system/lyne-components" + } + ] +} +
+`; +/* end snapshot sbb-menu-link renders component with icon and amount A11y tree Firefox */ + diff --git a/src/components/menu/menu-link/menu-link.spec.ts b/src/components/menu/menu-link/menu-link.spec.ts index 4937efe409..ec6d9197b9 100644 --- a/src/components/menu/menu-link/menu-link.spec.ts +++ b/src/components/menu/menu-link/menu-link.spec.ts @@ -1,52 +1,38 @@ import { expect } from '@open-wc/testing'; import { html } from 'lit/static-html.js'; -import { fixture } from '../../core/testing/private.js'; +import { fixture, testA11yTreeSnapshot } from '../../core/testing/private.js'; + +import type { SbbMenuLinkElement } from './menu-link.js'; import './menu-link.js'; describe(`sbb-menu-link`, () => { - it('renders component with icon and amount', async () => { - const root = await fixture(html` -