Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Keyboard Controls API #174

Open
joe-replin opened this issue Jul 12, 2022 · 4 comments
Open

Create Keyboard Controls API #174

joe-replin opened this issue Jul 12, 2022 · 4 comments

Comments

@joe-replin
Copy link
Contributor

joe-replin commented Jul 12, 2022

Creating a ticket to add an API within CORE by which external plug-ins my access keyboard controls that will function across browsers & screen reader combinations. Some use cases are as follows:

  • Matching Dropdown & Comboboxes
  • Navigating the resources tablist & corresponding tabpanel
  • Slider & Confidence Slider controls Update: native sliders
  • Escape keypress

Referencing a conversation with @oliverfoster & @chris-steele: adaptlearning/adapt-contrib-resources#78

@joe-replin
Copy link
Contributor Author

This has cropped up again in an accessibility review, mainly around the lack of navigable arrow controls present in https://github.com/cgkineo/adapt-visua11y

Nudging this request to see if it is something that is desirable for the larger purposes listed above.

@oliverfoster
Copy link
Member

Can you provide more detail on which parts of the visua11y ui need special arrow key behaviour?

@joe-replin
Copy link
Contributor Author

It would be the readability controls. Here is the feedback I am currently processing.

Keyboard operation of "Readability" radio options is not consistent. The following behavior was observed:

Up arrow consistently cycled focus backwards through all options
Down arrow moved focus forward, but is trapped once focus lands on the "Small" option
Left/right arrow keys do nothing 

To avoid confusion and better align with the default radio button experience we recommend allowing users to move back and forth through a radio grouping using up/right to move forward, and down/left to move backward. Forward/backwards navigation must allow users to consistently cycle through all option within a grouping.

​https://www.w3.org/WAI/ARIA/apg/patterns/radio/

@oliverfoster
Copy link
Member

oliverfoster commented May 3, 2023

That's a simple behaviour created with the correct markup and not supplemental Javascript for focus and display management (as is required for tab and custom select).

The arrow behavior is facilitated by a role=radiogroup container and a matching name attribute on each input in the group I believe.

See mcq.

We don't have to specify arrow key handlers, they come from the browser by default with the correct markup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants