Skip to content

Conversation

@ethanWallace
Copy link
Collaborator

@ethanWallace ethanWallace commented Nov 19, 2025

Summary | Résumé

Add attributes to match gcds-file-uploader behaviour to the HTML select to provide additional validation.

gcds-file-uploader has also been expanded to work with the HTML ValidityState to provide developers with more options when validating gcds-file-uploaders and new methods to check current validation state.

New properties/attributes

Property Attribute Description Type Default
autofocus autofocus If true, the file-uploader will be focused on component render boolean undefined
form form The ID of the form that the file-uploader field belongs to. string undefined
validity validity Read-only property of the select, returns a ValidityState object that represents the validity states this element is in. ValidityState undefined

New methods

Name Description Returns
checkValidity() Check the validity of gcds-file-uploader boolean
getValidationMessage() Get validationMessage of gcds-file-uploader string

cds-snc/design-gc-conception#2026

@ethanWallace ethanWallace requested a review from daine November 19, 2025 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants