Detailed answer
A repeated template can accidentally give every instance the same id.
Fragment navigation, labels, and scripts may then resolve to the wrong element. Use classes for repeated grouping and generate unique IDs for individual controls. Check the rendered document, not just one source file or template definition.
Example
<label for="email-main">Main email</label><input id="email-main" name="email_main">
<label for="email-backup">Backup email</label><input id="email-backup" name="email_backup">
Understanding the behavior
A component's internal IDs can become duplicated when the same markup is rendered repeatedly. Labels, description references and fragment links may then refer to an unintended instance. Uniqueness must be maintained across the complete document, not just one component file.
Practical implementation notes
Generate a stable unique prefix for each instance and update matching for, aria-describedby and href references. Test both the first and later copies, since the first copy can appear correct while others fail.
How to check it
Generate different control IDs for each instance while retaining the shared styling class.
Expected result
Each label targets its own input rather than an ambiguous duplicate.
Watch out: A template can look valid alone but become invalid when repeated.
Read the reference ↗