Skip to content

Commit e19b2e8

Browse files
committed
test(core): update specs to match a11y implementation changes
- cat-menu.spec: Update selectors from nav to div for role="menu" - cat-tag.spec: Remove role="combobox" and aria-controls from expected HTML
1 parent 5a45679 commit e19b2e8

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

core/src/components/cat-menu/cat-menu.spec.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -340,24 +340,24 @@ describe('cat-menu', () => {
340340
});
341341

342342
describe('menu content', () => {
343-
it('should render nav with role="menu" and default vertical orientation', async () => {
343+
it('should render div with role="menu" and default vertical orientation', async () => {
344344
const page = await newSpecPage({
345345
components: [CatMenu, CatDropdown, CatButton],
346346
html: `<cat-menu></cat-menu>`
347347
});
348348

349-
const nav = page.root?.shadowRoot?.querySelector('nav[role="menu"]');
350-
expect(nav?.getAttribute('aria-orientation')).toBe('vertical');
349+
const menu = page.root?.shadowRoot?.querySelector('div[role="menu"]');
350+
expect(menu?.getAttribute('aria-orientation')).toBe('vertical');
351351
});
352352

353-
it('should render nav with horizontal orientation when arrowNavigation is horizontal', async () => {
353+
it('should render div with horizontal orientation when arrowNavigation is horizontal', async () => {
354354
const page = await newSpecPage({
355355
components: [CatMenu, CatDropdown, CatButton],
356356
html: `<cat-menu arrow-navigation="horizontal"></cat-menu>`
357357
});
358358

359-
const nav = page.root?.shadowRoot?.querySelector('nav[role="menu"]');
360-
expect(nav?.getAttribute('aria-orientation')).toBe('horizontal');
359+
const menu = page.root?.shadowRoot?.querySelector('div[role="menu"]');
360+
expect(menu?.getAttribute('aria-orientation')).toBe('horizontal');
361361
});
362362
});
363363

core/src/components/cat-tag/cat-tag.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ describe('cat-tag', () => {
1111
<div class="label-container"></div>
1212
<div class="input-wrapper">
1313
<div class="input-inner-wrapper">
14-
<input aria-controls="tags-cat-input-0-list" class="tags-input" id="tags-cat-input-0-input" part="input" role="combobox">
14+
<input class="tags-input" id="tags-cat-input-0-input" part="input">
1515
</div>
1616
</div>
1717
`);

0 commit comments

Comments
 (0)