mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-08 23:58:13 +08:00
fix(breadcrumb): separator is not announced by narrators (#25796)
This commit is contained in:
@ -34,3 +34,20 @@ it('should correctly provide the collapsed breadcrumbs in the event payload', as
|
||||
expect(collapsedBreadcrumbs[1]).toBe(breadcrumb[2]);
|
||||
expect(collapsedBreadcrumbs[2]).toBe(breadcrumb[3]);
|
||||
});
|
||||
|
||||
it('should exclude the separator from narrators', async () => {
|
||||
const page = await newSpecPage({
|
||||
components: [Breadcrumbs, Breadcrumb],
|
||||
html: `
|
||||
<ion-breadcrumbs>
|
||||
<ion-breadcrumb>First</ion-breadcrumb>
|
||||
<ion-breadcrumb>Second</ion-breadcrumb>
|
||||
</ion-breadcrumbs>
|
||||
`,
|
||||
});
|
||||
|
||||
const firstBreadcrumb = page.body.querySelector('ion-breadcrumb:first-of-type');
|
||||
const separator = firstBreadcrumb.shadowRoot.querySelector('[part="separator"]');
|
||||
|
||||
expect(separator.getAttribute('aria-hidden')).toBe('true');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user