Slider
Cursore
Uno slider muove un cursore lungo una barra per scegliere un valore o un intervallo.
Un esempio vero
Un filtro per il prezzo usa due manopole: una fissa il prezzo più basso e una il prezzo più alto.
Parti principali
- 01Etichetta visibile
- 02Interaction target
- 03Current state
- 04Keyboard behavior
Usalo quando
Usalo quando una scelta approssimativa o relativa è più importante che digitare un numero esatto.
Non usarlo quando
Per valori esatti, mostra il numero corrente e supporta la tastiera. Altrimenti, evita un cursore.
Nome usato nel codice
<input type="range"> Prima di spedire
Give assistive tools the control’s name (accessible name), purpose (role), value, and state. Check keyboard use, visible focus, target size, disabled and busy states, feedback, and recovery.
Outcome: Complete the task with Cursore (Slider). User context: Un filtro per il prezzo usa due manopole: una fissa il prezzo più basso e una il prezzo più alto. Recommended pattern: Cursore (Slider). Why it fits: Usalo quando una scelta approssimativa o relativa è più importante che digitare un numero esatto. Do not use it when: Per valori esatti, mostra il numero corrente e supporta la tastiera. Altrimenti, evita un cursore. Product requirements: Define the default, loading, empty, error, success, and recovery states. Keep user input. Give clear feedback after every action. Accessibility and resilience: Use semantic HTML, full keyboard access, and visible focus. Make the layout work when zoomed and support reduced motion. Follow the project’s current rules. Do not add a new UI library unless the project already uses it. Acceptance criteria: The main task works with keyboard only and at 320px width. Focus and status changes are announced. Check loading, failure, retry, cancel, and reduced-motion paths. Evidence and limits (evidence boundary): Lo standard copre solo l'ambito elencato. Non sceglie lo stile visivo, la decisione sul prodotto o l'esempio di vocabolario. Unknowns to confirm: Product wording, data source, analytics events, supported devices and languages, and platform limits.
Controlla questa richiesta
Review how Cursore (Slider) is used now. Definition: Uno slider muove un cursore lungo una barra per scegliere un valore o un intervallo. Release checks: Give assistive tools the control’s name (accessible name), purpose (role), value, and state. Check keyboard use, visible focus, target size, disabled and busy states, feedback, and recovery. Before changing code, list the evidence, gaps, severity, and the smallest safe fix.