Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aria-controls attribute removed during runtime. #495

Open
Kashif-24 opened this issue May 10, 2024 · 3 comments
Open

aria-controls attribute removed during runtime. #495

Kashif-24 opened this issue May 10, 2024 · 3 comments

Comments

@Kashif-24
Copy link

Issue Summary:
The aria-controls attribute, which is set on certain elements in the HTML, is being unexpectedly removed during runtime when using the driver.js library for creating tours.

Steps to Reproduce:

  1. Set up a webpage with elements that have the aria-controls attribute defined.
  2. Initialize a tour using the driver.js library, targeting elements with aria-controls.
  3. Run the tour and observe that the aria-controls attribute is removed from the elements during runtime.

Expected Behavior:
The aria-controls attribute should remain intact on the elements even after running the tour with driver.js.

Actual Behavior:
The aria-controls attribute is removed from the elements during runtime, which can cause accessibility issues and unexpected behavior on the page.

@xionnon
Copy link

xionnon commented May 11, 2024

driver.js/src/highlight.ts

Lines 171 to 179 in 9e6f1a4

export function destroyHighlight() {
document.getElementById("driver-dummy-element")?.remove();
document.querySelectorAll(".driver-active-element").forEach(element => {
element.classList.remove("driver-active-element", "driver-no-interaction");
element.removeAttribute("aria-haspopup");
element.removeAttribute("aria-expanded");
element.removeAttribute("aria-controls");
});
}

@Kashif-24

@Kashif-24
Copy link
Author

thanks.

@Kashif-24
Copy link
Author

i test it but it is not working.
@xionnon
thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants