WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Web-based games

for

From: Patrick H. Lauke
Date: Aug 26, 2020 1:23PM


On 26/08/2020 19:45, <EMAIL REMOVED> wrote:
> The latest Syntax podcast includes a discussion of creating a minesweeper-style Web game with the React framework. The hosts suggested using React's pointer events. That made me cringe. I know little about React or its pointer events, but I assume that using them excludes keyboard users. Perhaps they will work on touch screens?

Pointer Events (which, as far as I know, is what React uses natively,
with polyfills/fallbacks for older browsers that don't implement them)
are an event model that covers all possible pointer-type inputs (mouse,
stylus, touchscreen). Using pointer events makes sure that stuff works
on various desktop/mobile/tablet/hybrid devices and with various input
types.

And yes, pointer events on their own won't help/do anything for keyboard
users (and the PE spec warns about this directly - see the note in the
introduction https://w3c.github.io/pointerevents/#intro)

Full disclosure: I'm chair of the WG and co-editor of the spec ;)

> today I did some searching and found skimpy resources for a developer wanting to create an accessible Web game. Does anyone have suggestions for reading materials on this topic.

It depends heavily on the type of game. In general, action/realtime
games will be exceedingly hard to make fully accessible (including
screen reader/AT users), while turn-based simple games are much easier
to accommodate with mostly general web-development concepts like making
sure there are focusable/keyboard operable controls, that content is
semantically structured, etc.

There's of course also varying levels of "accessible". Just making a
game keyboard accessible is much easier than also conveying the current
state (e.g. the whole "mine field") to an AT user in a sensible way (a
giant table/grid for instance). And you may even end up making something
that is technically accessible to screen reader users, but so utterly
tedious to navigate and use, that you may as well not bother.

Sorry, no simple answer or pointer...just that, unless we're talking
really basic games, making even a moderately complex game fully
accessible can be extremely challenging.

P
--
Patrick H. Lauke

https://www.splintered.co.uk/ | https://github.com/patrickhlauke
https://flickr.com/photos/redux/ | https://www.deviantart.com/redux
twitter: @patrick_h_lauke | skype: patrick_h_lauke