From 5753d3e648a44e43cb29abf3f924cc7a21bbf09b Mon Sep 17 00:00:00 2001 From: Ian Oxley Date: Fri, 23 Nov 2018 22:20:37 +0000 Subject: [PATCH] Improve a11y for the dropdown menu Add role="button" to make the component report itself as a button. Add tabindex so the menu toggle can receive keyboard focus. Add keydown handlers for `` and `` so the dropdown menu toggle responds to keyboard input. Set the aria-pressed attribute to true if the menu is open, or false if it is closed. --- website/client/components/ui/customMenuDropdown.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/website/client/components/ui/customMenuDropdown.vue b/website/client/components/ui/customMenuDropdown.vue index ddbf549e59..669f2a3c92 100644 --- a/website/client/components/ui/customMenuDropdown.vue +++ b/website/client/components/ui/customMenuDropdown.vue @@ -3,7 +3,7 @@ A simplified dropdown component that doesn't rely on buttons as toggles like bo -->