Skip to content

Bug: Cannot activate menu items with keyboard #1933

Open
@kcarrandale

Description

@kcarrandale

Describe the bug
You cannot activate the links/buttons in the admin area after tabbing to them.

To Reproduce
Steps to reproduce the behavior:

  1. Go to /admin/1/campaigns
  2. Use the tab key to go to the user icon button or any of the admin menu items (Campaigns, People, Message Review, Tags, Settings, Phone Numbers, or Switch to texter) and press enter or space. (I have not tested all of the buttons/links in the main content, but it's possibly an issue there as well.)
  3. The link/button doesn't activate.

Expected behavior
The user should be able to activate links/buttons with just a keyboard. See WebAIM: Keyboard Accessibility for more information on specific behaviors depending on item type.

Screenshots
N/A

Platform:

  • OS: Windows 10
  • Browser: Firefox
  • Desktop
  • Version 10.0

Additional context
I'm new to this, so I'm not sure what's practical within React/Spoke, but possible fixes for this type of issue include:

  • Coding all the menus as unordered lists of links within a nav element. This is the standard accessible format for menus; see Menu Structure for more information. I don't know if this is compatible with the way things are set up, however.
  • Add the correct function to a keyboard event, not just onClick. More information: Keyboard-navigable JavaScript widgets. Right now there appears to be stuff happening with onKeyDown, but it isn't activating anything. (It seems to be removing the button animation when the user hits escape?)

This bug is kind of related to issue #1928, since it has to do with keyboard navigation in the admin area.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-Admin UI/UXArea: Admin experience of using SpokeA-accessibilityArea: Accessibility of the app -- colors, font sizes, keyboard navigation etc...C-bugType: BugSV-follow-up

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions