Problem:
Some form elements in the Send Message flow use non-unique IDs such as placeholder_value. According to accessibility standards and best practices, each element must have a unique ID. Duplicate IDs can lead to:
Accessibility issues for users relying on assistive technologies, as screen readers cannot correctly associate labels or error messages with specific elements.
JavaScript errors or unpredictable behavior when manipulating elements by ID.
Parsing errors that violate the HTML specification and WCAG guidelines.
Relevant WCAG Success Criterion:
WCAG 2.1 SC 4.1.1 – Parsing
IDs must be unique to avoid parsing errors and ensure proper semantic associations.
Steps to Reproduce:
Open a form in the application.
Inspect form elements using the browser developer tools.
Observe that some elements share the same id attribute, such as placeholder_value.
Proposed Solution:
Assign Unique IDs to All Form Elements:
Replace generic or duplicate IDs with unique, meaningful IDs. For example:
<!-- Before -->
<input id="placeholder_value" name="email">
<input id="placeholder_value" name="username">
<!-- After -->
<input id="email" name="email">
<input id="username" name="username">
Update Related References:
Update any attributes that reference the IDs (e.g., for, aria-labelledby, aria-describedby) to match the new unique IDs.
Generate IDs Dynamically (if applicable):
For programmatically generated forms, implement logic to generate unique IDs for each form element.
Acceptance Criteria:
[ ] All form elements have unique id attributes.
[ ] Related attributes (for, aria-labelledby, etc.) correctly reference the unique IDs.
[ ] Changes are tested with screen readers (e.g., VoiceOver, NVDA, JAWS) to ensure proper associations.
[ ] The updated markup passes HTML validation without errors.
Issue: Ensure Form Elements Have Unique IDs
Problem:
Some form elements in the Send Message flow use non-unique IDs such as
placeholder_value
. According to accessibility standards and best practices, each element must have a unique ID. Duplicate IDs can lead to:Relevant WCAG Success Criterion:
IDs must be unique to avoid parsing errors and ensure proper semantic associations.
Steps to Reproduce:
id
attribute, such asplaceholder_value
.Proposed Solution:
Assign Unique IDs to All Form Elements:
Replace generic or duplicate IDs with unique, meaningful IDs. For example:
Update Related References:
for
,aria-labelledby
,aria-describedby
) to match the new unique IDs.Generate IDs Dynamically (if applicable):
Acceptance Criteria:
id
attributes.for
,aria-labelledby
, etc.) correctly reference the unique IDs.References:
By addressing this issue, we ensure that the application meets accessibility standards and provides a better user experience for all users.