Skip to content

v2.0.0-beta.6 (gen2)

Pre-release
Pre-release

Choose a tag to compare

@Rajdeepc Rajdeepc released this 05 Nov 08:02
· 31 commits to main since this release
4fd3079

This beta introduces <swc-text-field>, the Spectrum 2 text field, with accessible labelling, validation, and native form participation. It supports sizes s through xl, top or side label positions, a non-interactive prefix slot, and field-status for disabled, read-only, invalid, and valid states. Fields take part in FormData, honor ancestor fieldset disabling, submit on Enter, and restore their initial value on form reset.

It also reworks <swc-prompt-field> accessibility. Send and stop are now a single persistent button, so focus stays put when generating toggles and screen readers announce the new name on the focused control. The textarea is named directly instead of through visually hidden text.

⚠️ Important: this release contains breaking changes to the beta API. On <swc-prompt-field>, every attribute that sets a non-visible name now ends in -accessible-label. label is removed in favor of accessible-label (default "AI prompt"), and send-label, stop-label, upload-label, attachment-strip-label, and the two attachment scroll labels are all renamed to match. Separately, horizontal padding increased for large and extra-large Button and Action Button (14px to 16px, and 16px to 18px), which widens those buttons and any component that contains one.

Install: npm i @adobe/spectrum-wc@2.0.0-beta.6

Full changelog · Compare with 2.0.0-beta.5