fix: aria labels on form inputs in order configurator and describe flow
- aria-label + aria-value* attrs on confidence range slider (screen readers) - aria-label on volume number input - aria-pressed on service/destination selector buttons in beskriv flow - aria-label on describe textarea Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -67,6 +67,7 @@ export default function DescribePage() {
|
||||
<button
|
||||
key={s.id}
|
||||
onClick={() => setService(s.id)}
|
||||
aria-pressed={service === s.id}
|
||||
className="border px-3 py-2 font-mono text-[11px] uppercase tracking-[0.08em] transition-colors"
|
||||
style={{
|
||||
borderColor: service === s.id ? "var(--foreground)" : "var(--border)",
|
||||
@@ -87,6 +88,7 @@ export default function DescribePage() {
|
||||
value={text}
|
||||
onChange={(e) => setText(e.target.value)}
|
||||
placeholder={PLACEHOLDER}
|
||||
aria-label={t({ en: "Describe your data need", sv: "Beskriv ditt databehov" })}
|
||||
rows={5}
|
||||
className="mt-3 w-full resize-none border border-border bg-input px-4 py-3 text-sm outline-none focus:border-foreground"
|
||||
/>
|
||||
@@ -100,6 +102,7 @@ export default function DescribePage() {
|
||||
<button
|
||||
key={d}
|
||||
onClick={() => setDestination(destination === d ? "" : d)}
|
||||
aria-pressed={destination === d}
|
||||
className="border px-3 py-2 font-mono text-[11px] uppercase tracking-[0.08em] transition-colors"
|
||||
style={{
|
||||
borderColor: destination === d ? "var(--accent-red)" : "var(--border)",
|
||||
|
||||
@@ -249,6 +249,7 @@ export default function ConfiguratorPage() {
|
||||
step={100}
|
||||
value={volume}
|
||||
onChange={(e) => setVolume(Math.max(100, Number(e.target.value) || 0))}
|
||||
aria-label={t({ en: "Volume (records)", sv: "Volym (poster)" })}
|
||||
className="w-full border border-border bg-input px-3 py-2 font-mono text-sm outline-none focus:border-foreground"
|
||||
/>
|
||||
<div className="mt-3 flex gap-2">
|
||||
@@ -275,6 +276,11 @@ export default function ConfiguratorPage() {
|
||||
max={99}
|
||||
value={confidence}
|
||||
onChange={(e) => setConfidence(Number(e.target.value))}
|
||||
aria-label={t({ en: "Confidence target (%)", sv: "Konfidensmål (%)" })}
|
||||
aria-valuemin={80}
|
||||
aria-valuemax={99}
|
||||
aria-valuenow={confidence}
|
||||
aria-valuetext={`${confidence}%`}
|
||||
className="mt-3 w-full"
|
||||
style={{ accentColor: confidenceColor(confidence) }}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user