aws-samples / aws-samples/amazon-sagemaker-ground-truth-task-uis
Incorrect validation error for crowd-classifier-multi-select: "src" attribute should not be required
- Dominant language
- HTML
- Stars
- 112
- Forks
- 33
- PR merge metrics
- No merged PRs in 30d
Description
**Labels:** `bug`, `documentation`
**Description:**
## Bug Description
The SageMaker Ground Truth template validator incorrectly reports a validation error for `` claiming that the `src` attribute is required, when in fact this element does not use a `src` attribute.
**Error message:**
```
Potential errors
We found some potential errors with your usage of Crowd HTML Elements.
(Element type CROWD-CLASSIFIER-MULTI-SELECT): attributes should have required property 'src'
```
## Expected Behavior
`` should **not** require a `src` attribute. According to the [[official AWS documentation](https://docs.aws.amazon.com/sagemaker/latest/dg/sms-ui-template-crowd-classifier-multi-select.html)](https://docs.aws.amazon.com/sagemaker/latest/dg/sms-ui-template-crowd-classifier-multi-select.html), this element uses a `` child element instead of a `src` attribute.
The element has the following **required** attributes:
- `name`
- `categories`
- `header`
And uses `` as a child element to contain the content to be classified.
## Actual Behavior
The validator throws a false positive error claiming `src` is required, even when the template is correctly structured with ``.
## Template Example That Triggers the Error
```html
{{ task.input.taskObject }}
Positive sentiment include: joy, excitement, delight
Negative sentiment include: anger, sarcasm, anxiety
Neutral: neither positive or negative, such as stating a fact
N/A: when the text cannot be understood
When the sentiment is mixed, such as both joy and sadness, choose both labels.
Choose all categories that are expressed by the text.
```
This template is **correct** according to the documentation but triggers the validation error.
## Impact
This validation error is confusing for users creating custom templates, as it:
1. Suggests the template is incorrect when it's actually valid
2. May cause users to incorrectly add a `src` attribute that doesn't belong
3. Creates uncertainty about whether the template will work in production
## Additional Context
- The single-select version `` does **not** trigger this validation error when using the same structure
- The documentation clearly shows this element should use ``, not `src`
- This appears to be a bug in the validation logic, possibly conflating `` with `` (which **does** require a `src` attribute)
## Reproduction Steps
1. Go to SageMaker Ground Truth console
2. Create a custom labeling job template
3. Use the template code provided above
4. Observe the validation error appears despite the template being correct per documentation
## Suggested Fix
Update the validation schema for `` to:
- Remove `src` from the required attributes list
- Ensure it validates for `` child element instead
## Environment
- Service: Amazon SageMaker Ground Truth
- Console Region: `us-east-1`
- Date observed: January 2026
## References
- [[Official Documentation: crowd-classifier-multi-select](https://docs.aws.amazon.com/sagemaker/latest/dg/sms-ui-template-crowd-classifier-multi-select.html)](https://docs.aws.amazon.com/sagemaker/latest/dg/sms-ui-template-crowd-classifier-multi-select.html)
- [[Official Documentation: crowd-image-classifier-multi-select](https://docs.aws.amazon.com/sagemaker/latest/dg/sms-ui-template-crowd-image-classifier-multi-select.html)](https://docs.aws.amazon.com/sagemaker/latest/dg/sms-ui-template-crowd-image-classifier-multi-select.html) (for comparison - this one DOES use `src`)
Contributor guide
Assessment
This issue has not been assessed yet.