-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Hello, graphiql
maintainers!
GitHub's API team provides an integrated client within GitHub's public web documentation for GraphQL. We're big fans of the tool, and use it as a means for integrators to become more familiar with our GraphQL schema. We've recently upgraded to the latest version of the graphiql
package (3.0.5
as of September 18, 2023), and thereby many built in features of the client. This client is one of the most utilized aspects of the GraphQL doc set, so it's highly visible for visitors with GraphQL in mind.
Recently, we've placed a stronger focus on making our web experience more accessible as we strive to become the home for all developers. With that in mind, we believe there are a few improvements that would greatly enhance the experience of developers/users with varying disabilities. 🎉
Here are a few accessibility concerns identified by an internal audit here at GitHub:
- The elements of the Graphiql explorer pane are not focusable:
In other words, when a user tabs through the explorer pane, each schema component/form element should be focusable
- The focus order is not logical:
In this instance, the user tabs to the "History", hits enter, and instead of the next tab sequence stepping into the History view, the user is directed to the next button (The Explorer
button).
- There isn't appropriate labels for the form elements of the GraphiQL Explorer pane (i.e: fields, queries, or mutation):
Providing the right aria-label
helps people who utilize screen readers.
- Form elements don't include the
role
attribute for the GraphiQL Explorer:
** screen reader concern
- Missing associated label 'Add new' along with the query dropdown.
** screen reader concern
- The luminosity ratio of the ' " _" ' should be greater than or equal to 4.5:1:
** Update - September 27th, 2023
- The luminosity ratio for the text within the query editor and results pane doesn't meet the contrast ratio of
4.5:1
for the default light mode or dark mode (Although, Dark mode is closer 👍🏽). I've taken a dive into each element of the query editor in hopes that it'll help shed light on the selectors that require adjustments. 🙏🏽
With Default (Light) Theme
With Dark Mode Theme
As you can see, most of our accessibility findings stem from the GraphQL Explorer feature, or more specifically, the @graphiql/explorer-plugin
package. It could be that these concerns have been addressed in more recent versions of the explorer, however, we encountered some issues upgrading to the latest graphiql
package with the explorer package included. We did have success upgrading to version 0.1.4
of the explorer plugin along with 2.0.7
of the graphiql
package, but noticed that the same issues remained. If it's confirmed that the above has been addressed in later versions of the explorer plugin, we'd be happy to invest more time into the upgrade, but for the moment, we've decided to omit the explorer feature from the client given the accessibility concerns above.
Lastly, thanks for all the hard work you've put into making this a great tool! 🙏