-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Mask & Timepicker - Code Review #494
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
Conversation
…ption, backspace & delete behavior.
…erals / placeholders
…ts have focus in the tests to stop an odd sometimes bug
… function to make more sense
Conflicts: tests/unit/all.html
This change adds a test for the functionality to remove an invalid value on blur as described in section 3 of http://wiki.jqueryui.com/w/page/12137996/Mask: Removing an incomplete value can be done by binding to the regular blur event, checking !mask("valid"), then using .val("") to clear the input.
@zjs has been working on this during the summit and beyond. Still a few open issues. |
@zjs thanks again for picking this up - I'll leave it in good hands 👍 I still want to rename |
Hey all, I meant to bring this up at Dev days but didn't end up having time. I was curious if there's a general strategy in place for how this component will end up presenting itself from an a11y standpoint. I did a quick test and currently, the masked input is very loud and confusing when used in a screenreader, like VoiceOver. When you focus on the input, it reads aloud ("underline underline underline underline underline underline underline underline underline underline "). As you continue to use it, I think it gets even more confusing. I'm not an everyday screenreader user, but this seems like a valid issue with masked input patterns in general, unless there are known ways to avoid the issue that are not yet implemented? I'm not sure this situation is avoidable when manipulating a form control's value, which raises the question of whether that practice is a good idea, or whether an alternative approach might be needed that only affects sighted users (I've no idea what that may be). Thanks for your time! On Oct 22, 2012, at 4:45 PM, Corey Frang wrote:
|
In addition, I'm curious how this would play out on mobile devices. I haven't done any testing there, but wondered if the behavior is workable with touchscreen keyboards and their event handling (even if not designed to be mobile-optimized). |
@gnarf37 - I believe @artzstudio (who was looking at This would equate to extracting the Once implemented, It seems like this general widget might be easily re-used for other purposes (height: |
@scottjehl: Good point about a11y. I know I haven't looked at that at all, but perhaps we could leverage some of the placeholder string-related handling. I'm not sure what investigation (if any) @gnarf37 has already done in that space. As for mobile devices, both Chrome and Safari on iOS seem to play nicely with the current implementation. I would expect others would as well, but it's certainly something we should validate. |
Chrome on Android 4.1 works well. On the stock browser the phone number demo keeps switching back to the regular keyboard from the number keyboard, which is really annoying, but still usable (both with Swiftkey and stock keyboard). For screenreaders it would probably be preferable to have the screenreader ignore the mask and read only the actual input. Could be hard to achieve, as we manipulate the input's value directly. Maybe @hanshillen has some input on that? |
Regarding a11y - I had done very little research here. |
@zjs @artzstudio @jzaefferer - 👍 🍰 - spinnermask sounds pretty awesome. |
Conflicts: build/tasks/testswarm.js tests/unit/all.html
Closing until we're ready to do the full review after the 1.11 release. |
Not much stopping me from wanting to pull this into master... We need a code review, and also need some demos pages.