Find Elements with Instance Snippets
Introduction
After running a site scan, you might need a quick way to locate the specific element causing an accessibility issue. With AAArdvark, you can use JavaScript snippets to find the affected element directly on your website.
![](https://aaardvarkaccessibility.com/wp-content/uploads/2024/04/Aaardvark-guide-JS-snippets-1024x799.png)
Get the Snippet
- Locate the Issue: Go to the Issues tab and select the issue you want to inspect. Ensure it is marked as Active.
- Expand Details: Scroll down to the section displaying either a screenshot or code. Look for the Show Snippet link and click it.
![](https://aaardvarkaccessibility.com/wp-content/uploads/2024/04/1-1024x726.png)
- Copy the Snippet: A JavaScript snippet will appear in a code box. Click Copy to Clipboard to copy the code.
![](https://aaardvarkaccessibility.com/wp-content/uploads/2024/04/2-1024x805.png)
Using the Snippet
You’ll use the snippet in a separate browser window where you’re viewing the page of your website where the accessibility issue is happening. You’ll use the browser console to locate the element.
- Open the Browser Console: Right-click anywhere on the affected page and choose Inspect (or the equivalent option in your browser).
![](https://aaardvarkaccessibility.com/wp-content/uploads/2024/04/3.png)
- Navigate to the Console Tab: In the developer tools, switch to the Console tab.
- Paste the Snippet: Paste the copied JavaScript snippet into the console and press Enter.
- View the Highlighted Element: The affected element will be outlined in red on your page.
![](https://aaardvarkaccessibility.com/wp-content/uploads/2024/04/Aaardvark-guide-JS-snippets-1024x799.png)
Tip: If your browser prompts you to confirm running scripts, follow the instructions to proceed safely.