diff --git a/docs/site/components/feedback-widget.tsx b/docs/site/components/feedback-widget.tsx index 953daded0a72e..ce6984d7337aa 100644 --- a/docs/site/components/feedback-widget.tsx +++ b/docs/site/components/feedback-widget.tsx @@ -22,7 +22,9 @@ export function FeedbackWidget() { { emoji: "ðŸ˜", component: , label: "Hate it" }, ]; - const handleSubmit = (e?: React.FormEvent): void => { + const handleSubmit = ( + e?: React.FormEvent | React.MouseEvent + ): void => { e?.preventDefault(); setLoading(true); @@ -108,6 +110,19 @@ export function FeedbackWidget() { /> + {!selectedEmoji && feedback ? ( + + Please select an emoji. + + ) : ( + + )} + {emojis.map((item) => { @@ -123,6 +138,11 @@ export function FeedbackWidget() { : "" )} aria-label={item.label} + aria-describedby={ + !selectedEmoji && feedback + ? "emoji-selection-error" + : undefined + } > {item.component} @@ -133,7 +153,9 @@ export function FeedbackWidget() { handleSubmit(e)} + onClick={(e: React.MouseEvent) => + handleSubmit(e) + } disabled={loading || !feedback || !selectedEmoji} > Send diff --git a/packages/turbo-types/schemas/schema.json b/packages/turbo-types/schemas/schema.json index 346dbac4c3cd0..82684a848c799 100644 --- a/packages/turbo-types/schemas/schema.json +++ b/packages/turbo-types/schemas/schema.json @@ -378,4 +378,4 @@ "additionalProperties": false } } -} +} \ No newline at end of file diff --git a/packages/turbo-types/schemas/schema.v1.json b/packages/turbo-types/schemas/schema.v1.json index 89beae61d3842..ef407c36e0a07 100644 --- a/packages/turbo-types/schemas/schema.v1.json +++ b/packages/turbo-types/schemas/schema.v1.json @@ -244,4 +244,4 @@ "additionalProperties": false } } -} +} \ No newline at end of file diff --git a/packages/turbo-types/schemas/schema.v2.json b/packages/turbo-types/schemas/schema.v2.json index 346dbac4c3cd0..82684a848c799 100644 --- a/packages/turbo-types/schemas/schema.v2.json +++ b/packages/turbo-types/schemas/schema.v2.json @@ -378,4 +378,4 @@ "additionalProperties": false } } -} +} \ No newline at end of file
+ Please select an emoji. +