Context Menu
A context menu shows commands for the object or area that opened it. It often opens with a right-click or context-menu key.
A real example
A user selects one report and opens Rename, Duplicate, and Archive by right-click or keyboard. Escape closes the menu and returns focus to the report. Dangerous actions still need clear words and confirmation that matches the risk.
Main parts
- 01invoking context
- 02object-specific commands
- 03focus return
Use it when
Use this term for extra commands that depend on the selected or pointed-at object.
Do not use it when
Do not hide a main or required action only inside a context menu.
Name used in code
context trigger → object-specific role=menu Before you ship
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: Use Context Menu to solve this user need without losing the current context. User context: A user selects one report and opens Rename, Duplicate, and Archive by right-click or keyboard. Escape closes the menu and returns focus to the report. Dangerous actions still need clear words and confirmation that matches the risk. Recommended pattern: Context Menu. Why it fits: Use this term for extra commands that depend on the selected or pointed-at object. Do not use it when: Do not hide a main or required action only inside a context menu. 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): No single official standard controls the whole term. Its meaning may change across teams, platforms, or frameworks. Unknowns to confirm: Product wording, data source, analytics events, supported devices and languages, and platform limits.
Check this request
Review the current use of Context Menu. Definition: A context menu shows commands for the object or area that opened it. It often opens with a right-click or context-menu key. 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, report the evidence you found, gaps, severity, and the smallest safe fix.