-
Notifications
You must be signed in to change notification settings - Fork 13
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
Add form instructions for screen readers #87
Conversation
As the form is now essentially doing everything the default way, I think this is all we need, but I'm not sure on a couple points:
|
<%= t('hydra_editor.form.title') %> | ||
<small class="pull-right"><span class="error">*</span> <%= t('hydra_editor.form.required_fields') %></small> | ||
</h2> | ||
<div class="instructions"><%= t('hydra_editor.form.instructions') %></div> |
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.
Seems like <p>
would be a more semantic tag.
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.
I think you're right - let me fix that
Cool styling idea: put the words 'tab', 'space', and 'enter' in little keyboard-looking boxes, e.g.: http://michaelhue.com/keyscss/ |
Wording idea (a little more terse): 'Use the tab key to navigate the form, press space Another idea (more detailed re: 'enter'): I've been told, though, that I tend to use language that is too technical when writing this stuff |
I'll check out the keys css thing - I think the "kbd" tag is proper anyway, so adding a bit of CSS only helps. As for the enter situation - enter only submits within a text field. There's been some confusion on that point, but the original change I made to make enter submit forms doesn't actually override the enter key, it just returns the enter key to the default behavior. If you tab over a button and hit enter, it's the same as a button click. The good news is most people will be used to this functionality. The bad news is that if we want to explain it precisely, we have to explain that enter in a text area doesn't submit the form, etc. And the more explanation we add, the more screen reader users have to listen through on every form. I'm not sure how to balance the text given that. I'm gonna dig through webaim - I am sure I once read about something (other than just skip links) to make that kind of explanation easy to skip past. |
Oh, keys.css is licensed as MIT - including its code directly in here may be questionable. I have no idea, I'm not a license guy. I'll add |
Sounds good! And thanks for clarifying. |
Oh this is neat - bootstrap gives us nice styling out of the box! keys.css is nicer, but we have a pretty good default at least. |
Rad, I think the bootstrap style looks totally good / sufficiently fancy! |
Okay, used your more terse wording and added the kbd tags. The biggest downside is the need for the |
Add form instructions for screen readers
Adds very basic explanation of the tab/enter keys for keyboard-only users (or users who simply prefer the keyboard)