Issue: Element IDs are not unique
Issue | Conformance | Description |
---|---|---|
Element IDs are not unique | A | Two or more elements on this page have the same |
Sometimes it's important to know how different page elements fit together. Whereas sighted visitors may be able to get this information from the visual layout, visitors using screen readers rely on page elements being marked up correctly in the HTML.
This fix requires editing HTML Code and Velocity Script.
Good News! You only need to make this change once. This change will propagate to every page on your site after you re-publish the pages.
It is recommended that you work with two browser windows open (Cascade CMS and Siteimprove) as you complete this process.
Locate the code to fix
When viewing a page report in Siteimprove, the default view shows page content. When you click on the
Show HTML button, Siteimprove will highlight the issue location in the code.
When working with this issue, your page report may look very similar to the one displayed below. The id
attribute specifies a unique id for an HTML element. The value of the id
attribute must be unique within the HTML document. Note that the occurrences included in the list below contain multiple IDs that are repetitive.
Working with Element ID’s requires editing multiple template formats within your site.
Instructions
In your Cascade CMS site, select the _cascade folder.
Select the formats folder.
Select the _shared folder. This folder contains all of the main formats that Cascade CMS uses to populate sections of the legacy template.
Files in the _cascade folder control a specific region on every page in your site. Making a change to this asset will require you to re-publish your pages in your site for the changes to take effect.
Update Cascade Format Files
Edit the Feature-Text Velocity Format
In the _shared folder, select feature-text.
On the Velocity Format:feature-text page, click Edit. The edit format window opens.
On or around line 6 of the code, locate the
<section>
HTML tag and select the textid="theme"
and delete it.On or around line 9 of the code, locate the
<div>
HTML tag and select the textid="content"
and delete it.Click Preview Draft and then Submit to save to Cascade CMS.
After you have successfully saved the velocity format, go to the page in Cascade CMS that was identified in the Siteimprove page report and publish the page.
Edit the Footer-Links Velocity Format
In the _shared folder, select footer-links.
On the Velocity Format:footer-links page, click Edit. The edit format window opens.
On or around line 11 of the code, locate the
<ul>
HTML tag and select the textid="General"
and delete it.Click Preview Draft and then Submit to save to Cascade CMS.
After you have successfully saved the velocity format, go to the page in Cascade CMS that was identified in the Siteimprove page report and publish the page.
Verify successful remediation
Return to the Siteimprove to recheck the page.
You can recheck the page from the page report window or the list of pages in the issue overview page.
When you return to the issues overview page in Siteimprove, the page you fixed will no longer be listed for this particular issue.
On the page report window, if you have successfully corrected all issues on that page, you will see a “Great Job! All occurrences on this page have been fixed” badge.