Skip to content

Open-source agentic AI Search Execution Platform. Track AI visibility, find opportunities, and let agents turn signals into prioritized actions and drafted fixes across ChatGPT, Claude, Gemini, Google AI Overviews, Google AI Mode, Perplexity, Grok, and Microsoft Copilot.

fix(prompts): give the prompt suggestion checkbox a name and checked state (#976)

Gökhan Geyik2f6448e4a6d3
diff --git a/web/messages/en.json b/web/messages/en.json
index 7e08f48eb..c4fe3807d 100644
--- a/web/messages/en.json
+++ b/web/messages/en.json
@@ -1889,7 +1889,13 @@
"presenceRate": "Presence Rate",
"gaps": "Content Gaps",
"suggestions": {
- "measuredSuggestionsKept": "Search Console and Analytics suggestions were kept — dismiss them individually to hide them for 30 days."
+ "measuredSuggestionsKept": "Search Console and Analytics suggestions were kept — dismiss them individually to hide them for 30 days.",
+ "include": "Include this prompt",
+ "topic": "Topic",
+ "selectTopic": "Select a topic",
+ "platformsAndModels": "Platform & Models",
+ "selectPlatformsAndModels": "Select platform & models",
+ "selectedCount": "{count} selected"
}
},
"competitors": {
diff --git a/web/src/components/dashboard/prompt-suggestion-card.tsx b/web/src/components/dashboard/prompt-suggestion-card.tsx
index b0258b54e..265f06ccc 100644
--- a/web/src/components/dashboard/prompt-suggestion-card.tsx
+++ b/web/src/components/dashboard/prompt-suggestion-card.tsx
@@ -1,6 +1,7 @@
'use client';
import { memo, useState } from 'react';
+import { useTranslations } from 'next-intl';
import { Badge } from '@/components/ui/badge';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
@@ -106,6 +107,7 @@ export const PromptSuggestionCard = memo(function PromptSuggestionCard({
onCategoryChange,
mode = 'review',
}: PromptSuggestionCardProps) {
+ const ts = useTranslations('prompts.suggestions');
const [isEditing, setIsEditing] = useState(false);
const [editText, setEditText] = useState(text);
const [editCategory, setEditCategory] = useState(category);
@@ -154,6 +156,9 @@ export const PromptSuggestionCard = memo(function PromptSuggestionCard({
{/* Toggle checkbox */}
<button
type="button"
+ role="checkbox"
+ aria-checked={isActive}
+ aria-label={ts('include')}
onClick={onToggle}
className={cn(
'mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center rounded border-2 transition-colors',
@@ -207,11 +212,11 @@ export const PromptSuggestionCard = memo(function PromptSuggestionCard({
{onCategoryChange && topics && topics.length > 0 && (
<div>
<label className="mb-1.5 block text-xs font-medium text-muted-foreground">
- Topic
+ {ts('topic')}
</label>
<Select value={editCategory} onValueChange={(v) => v && setEditCategory(v)}>
<SelectTrigger className="w-full">
- <SelectValue placeholder="Select a topic" />
+ <SelectValue placeholder={ts('selectTopic')} />
</SelectTrigger>
<SelectContent>
{topics.map((t) => (
@@ -228,7 +233,7 @@ export const PromptSuggestionCard = memo(function PromptSuggestionCard({
{(onModelsChange || onPlatformsChange) && (
<div>
<label className="mb-1.5 block text-xs font-medium text-muted-foreground">
- Platform & Models
+ {ts('platformsAndModels')}
</label>
<Select
value="__placeholder__"
@@ -247,8 +252,10 @@ export const PromptSuggestionCard = memo(function PromptSuggestionCard({
<SelectTrigger className="w-full">
<span className="truncate text-muted-foreground">
{editModels.length + editPlatforms.length > 0
- ? `${editModels.length + editPlatforms.length} selected`
- : 'Select platform & models'}
+ ? ts('selectedCount', {
+ count: editModels.length + editPlatforms.length,
+ })
+ : ts('selectPlatformsAndModels')}
</span>
</SelectTrigger>
<SelectContent>