datle-dev / yubi

Minimalist typing test
MIT License
0 stars 0 forks source link

Fix accessibility of typing window #43

Closed datle-dev closed 1 month ago

datle-dev commented 1 month ago

Changes

Major Changes

Return accessibility to page, allowing for tabbing through links/buttons/areas.

Bug Fixes / Minor Changes

Why

Default key codes were prevented from being used to facilitate engaging in the typing test, but this interfered with accessibility since tabbing wouldn't move between links/buttons/areas.

How

The main keydown function handler was moved out of the useEffect hook and an onKeyDown attribute was added to the typing area component (and propagated down into the component) to localize keydown event listening to the typing area component only.

Notes

N/A