sensu-docs icon indicating copy to clipboard operation
sensu-docs copied to clipboard

[Accessibility] Page rating function is not keyboard-accessible

Open hillaryfraley opened this issue 2 years ago • 1 comments

Description

The entire page rating function at the top-right of the docs pages is not keyboard-accessible. Also tested with macOS VoiceOver.

Category

This is an issue with:

  • [ ] bug (bug in site build, layout, or functionality)
  • [x] enhancement (add new or updated site functionality)

Affected pages

https://github.com/sensu/sensu-docs/blob/main/layouts/partials/contribute.html

Expected behavior

Users can navigate to the rating function on the page and select a rating using only their keyboard

Current behavior

Keyboard navigation (via tab button and via VoiceOver controls) skips from the end of the main content section to the first item in the right-nav menu

Changes needed

Unsure -- maybe add tabindex="0" to the divs.

hillaryfraley avatar Nov 03 '22 17:11 hillaryfraley

I've done a little more investigation and testing.

If I add tabindex="0" to the div, I can tab to the entire ratings item but not to the individual rating options: tabindex-div

If I add tabindex="0" to the label for each rating option, I can tab to the individual rating options: tabindex-labels

Even though I can navigate to each rating option with tab, I cannot select a rating option with the space bar or Enter key.

Adding tabindex="0" to the input tag for each rating option does not work (cannot tab to individual rating options).

Another issue is it seems the tabindex="0" should not be necessary for radio buttons to be keyboard accessible -- the type="radio" should be sufficient, but in this case it doesn't seem to be.

hillaryfraley avatar Nov 09 '22 19:11 hillaryfraley