Skip to content
Merged
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
12 changes: 12 additions & 0 deletions src/components/my-map/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,18 @@ export class MyMap extends LitElement {
node.setAttribute("aria-label", node.getAttribute("title") || ""),
);

// Apply aria-controls to attribution button for accessibility
const olAttributionButton: NodeListOf<HTMLButtonElement> | undefined =
this.renderRoot?.querySelectorAll(".ol-attribution button");
olAttributionButton?.forEach((node) =>
node.setAttribute("aria-controls", "ol-attribution-list"),
);

// Apply ID to attribution list for accessibility
const olList: NodeListOf<HTMLElement> | undefined =
this.renderRoot?.querySelectorAll(".ol-attribution ul");
olList?.forEach((node) => node.setAttribute("id", "ol-attribution-list"));

// Re-order overlay elements so that OL Attribution is final element
// making OL Controls first in natural tab order for accessibility
const olAttribution = this.renderRoot?.querySelector(
Expand Down