-
Notifications
You must be signed in to change notification settings - Fork 6
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
Player accessibility improvements. #3
base: master
Are you sure you want to change the base?
Player accessibility improvements. #3
Conversation
…s. Replaced submit/reset buttons and main game area with a form. Added keyup event listeners where relevant. Adjusted ARIA labeling on several components. Added corresponding focus rules to buttons with hover rules. Added logic to toggle inert on and off depending on open dialogs. Added auto-focus logic when canceling a submission to fill more blanks.
… sentence containing the current blank.
… the relevant ones.
It turns out Ctrl + W and Ctrl + T are both OSX system-level key bindings for manipulating text in inputs, which means we can't use them. I've opted for Ctrl + Enter and Ctrl + Space instead, which required changing the main paragraph container from a form back to a div among other things. After some more consideration of other possible use cases, I'm thinking there's really no reasonable way to tell for sure where any given sentence ends or begins in the entire paragraph. Even under ideal conditions, the moment somebody includes an abbreviation or a title ending with a period the calculus will get thrown off and the readouts won't work any more, so for the time being I've opted to keep the 'whole paragraph' read function and remove the binding to read the sentence associated with the current blank space. I've instead added a keybind to re-read the instructions.
|
…sted spacing of the widget title. Changed keybinds from Ctrl+W and Ctrl+T to Ctrl+Enter and Ctrl+Space. Removed the 'read current blank's sentence' function since at the moment it doesn't seem reasonably possible to accomplish without being highly error prone. Rearranged a few elements and replaced keyup event listeners with keypress event listeners to prevent accidental submissions. Added a keybind to re-read keyboard instructions.
…orrect key for reading out the entire paragraph. Adjusted the control+Enter listener's behavior to dynamically build the entire paragraph and substitute the current input values where applicable.
Changes look good. Just having Ctrl + Enter and Ctrl + Space I think works great; It’s a good way to get an idea beforehand of what to expect, before moving in to each blank space and using arrow keys to get context. A few more things I noticed:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functional and sensible. The only weirdness I noticed: ctrl
+ space
, used to re-read the instructions, is bound to Spotlight (at least for me), which takes precedence and immediately defocuses the board. I'm not sure what to recommend as an alternative key combination, though. Overall it's a minor issue.
I've experimented a little bit and tried looking up various operating systems's/browsers' keybinds, and between all of those possibilities and this widget relying on just about every key being usable there really aren't any safe keybinds we can use that won't be hijacked by something, somewhere. To say nothing of any potential custom keybinds. I think the current keybinds might be as good as we're liable to get, unless somebody more familiar with acceptable custom keyboard macros comes along with a better idea. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Imports required fonts and adjusts styling on the widget title to prevent weird spacing issues in some browsers for some users.
Closes #2.
Updated MWDK version.
Added tab indices to numerous elements.
Replaced submit/reset buttons and main game area with a form.
Added keyup event listeners where relevant.
Adjusted ARIA labeling on several components.
Added corresponding focus rules to buttons with hover rules.
Added logic to toggle inert on and off depending on open dialogs.
Added auto-focus logic when canceling a submission to fill more blanks.
Added key bindings to read the entire paragraph
or to read the sentence that contains the currently focused blank locationand re-read keyboard instructions.Swapped the 'Submit what I have' and 'Show me what I'm missing' buttons in the submission confirmation dialog to prevent accidental early submissions.
Changed the 'keyup' event listeners on the submission confirmation buttons to 'keypress' to prevent accidental activations if using the Enter key on the 'Submit' button.