Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,14 @@ describe("calcite-autocomplete", () => {
focusable("calcite-autocomplete");
});

it("should set screen reader list attribute 'aria-live' to 'polite'", async () => {
const page = await newE2EPage();
await page.setContent(simpleHTML);

const screenReaderList = await page.find(`calcite-autocomplete >>> .${CSS.screenReadersOnly}`);
expect(await screenReaderList.getProperty("ariaLive")).toBe("polite");
});

it("should be able to remove icon", async () => {
const page = await newE2EPage();
await page.setContent(simpleHTML);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -867,6 +867,7 @@ export class Autocomplete
return (
<ul
aria-labelledby={this.inputId}
ariaLive="polite"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we test for this attribute in an E2E test? I don’t think axe will catch it if it’s missing, so we’ll need to add explicit coverage.

class={CSS.screenReadersOnly}
id={this.listId}
role="listbox"
Expand Down
Loading