Duplicate IDs
-
Hi,
when adding two forms to a single page, the following content is added twice. However because it has an ID, it means two elements on the page have the same ID. This is causing an accessibility issue.
<script id=”nf-tmpl-cell” type=”text/template”>
<nf-fields></nf-fields>
</script>
<script id=”nf-tmpl-row” type=”text/template”>
<nf-cells></nf-cells>
</script>Under the WCAG criteria elements on a page must have unique IDs: https://www.w3.org/WAI/WCAG21/Understanding/parsing.html
Can these IDs be removed and replaced with classes or unique IDs be generated instead? Or is there another solution, for example to only include the code once irrespective of the number of forms on the page?
Thanks
The topic ‘Duplicate IDs’ is closed to new replies.