Menu Button
Pulsante del menu
Un pulsante menu apre un elenco di azioni o scelte. Indica al software se il menu è aperto.
Un esempio vero
In un editor di documenti, “Esporta” apre le opzioni PDF, DOCX e Markdown. Freccia Giù apre il menu e mette a fuoco il primo elemento; Esc lo chiude e restituisce il focus. Scegliendo PDF si avvia un'esportazione unica, non un'impostazione permanente.
Parti principali
- 01Pulsante di attivazione
- 02Menù a comparsa
- 03Voci di menu
Usalo quando
Usalo per un piccolo gruppo di comandi quando mostrare ogni pulsante renderebbe la pagina affollata. Includi l'intero comportamento della tastiera del menu.
Non usarlo quando
Non utilizzare i ruoli del menu per i normali link del sito o per un campo di un modulo che invia un valore.
Nome usato nel codice
button aria-haspopup=menu aria-expanded + role=menu/menuitem Prima di spedire
Move focus on purpose. Keep it inside only when the overlay blocks the page. Support Escape and a visible close button, then return focus to the opener. Keep entered data and check small-screen, loading, and failure states.
Outcome: Complete the task with Pulsante del menu (Menu Button). User context: In un editor di documenti, “Esporta” apre le opzioni PDF, DOCX e Markdown. Freccia Giù apre il menu e mette a fuoco il primo elemento; Esc lo chiude e restituisce il focus. Scegliendo PDF si avvia un'esportazione unica, non un'impostazione permanente. Recommended pattern: Pulsante del menu (Menu Button). Why it fits: Usalo per un piccolo gruppo di comandi quando mostrare ogni pulsante renderebbe la pagina affollata. Includi l'intero comportamento della tastiera del menu. Do not use it when: Non utilizzare i ruoli del menu per i normali link del sito o per un campo di un modulo che invia un valore. 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): È ufficiale per quella fonte. Altre piattaforme o team potrebbero usare il termine in modo diverso. Unknowns to confirm: Product wording, data source, analytics events, supported devices and languages, and platform limits.
Controlla questa richiesta
Review how Pulsante del menu (Menu Button) is used now. Definition: Un pulsante menu apre un elenco di azioni o scelte. Indica al software se il menu è aperto. Release checks: Move focus on purpose. Keep it inside only when the overlay blocks the page. Support Escape and a visible close button, then return focus to the opener. Keep entered data and check small-screen, loading, and failure states. Before changing code, list the evidence, gaps, severity, and the smallest safe fix.