graphql / graphiql

GraphiQL & the GraphQL LSP Reference Ecosystem for building browser & IDE tools.
MIT License
15.99k stars 1.71k forks source link

[graphiql] Settings dialog button group does not comply with accessibility behaviors #2891

Open TheMightyPenguin opened 1 year ago

TheMightyPenguin commented 1 year ago

Is there an existing issue for this?

Current Behavior

The ButtonGroup in the Settings dialog, specifically when changing the current theme:

image

Behaves more like a RadioGroup control, and it doesn't have the appropriate keyboard event handling or aria attributes to indicate this: https://www.w3.org/WAI/ARIA/apg/patterns/radiobutton/

Expected Behavior

These buttons should comply with the standard for accessible radio groups.

Steps To Reproduce

1. Open the GraphiQL demo http://graphql.org/swapi-graphql
2. Open the settings dialog
3. Navigate it using `tab` and once you land on the "System" button, try navigating using the arrow keys
4. Also inspect the elements and you'll notice they don't have the appropriate attributes

Module pattern

Environment

- GraphiQL Version: latest
- OS: Mac OS 12.5
- Browser: Chrome 107
- Bundler:
- `react` Version: 17
- `graphql` Version: 16

Anything else?

No response

TheMightyPenguin commented 1 year ago

I'd like to give this one a go after I finish https://github.com/graphql/graphiql/issues/2793