-
Notifications
You must be signed in to change notification settings - Fork 358
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 date picker spin button example for issue 125 #1053
Conversation
…ub.com/w3c/aria-practices into issue125-spinbutton-datepicker-example
@mcking65 @jongund I reviewed this one as well, functionality and looks are good. I pushed a commit to satisfy the html and css linters. A few minor issues:
|
Valarie,
|
…ia-valuetext for year spinbutton
@spectranaut @mcking65 |
I'm conflicted what to say or do about touch screen reader support. This form of spin button implementation cannot work with touch screen readers. It cannot be made to work until we have interactions supported by AOM. However, between now and the time we can use AOM, it is possible to make a spinbutton touch accessible by moving the increment and decrement buttons outside the spinbutton div and then making them focusable with tabindex -1. The downside is more clutter for desktop screen reader users. The upside is more users have access. So, should we:
While we have stated in the Read Me First section that touch screen reader support is not yet addressed by the APG, we have also been working at avoiding increasing touch debt. This seems like a good example of a place where we might want to avoid increasing debt. |
…example to make the increase and decrease buttons real buttons to support touch devices
…3c/aria-practices into issue125-spinbutton-datepicker-example
I have updated the datepicker spin button example to make the increment and decrement buttons real buttons to support touch devices and given them a I tried to update the test file and made some progress, but didn't have time to finish it, so if Valarie could fix it that would be great. I can work on any changes Wednesday afternoon, i will be out Wednesday morning. |
I was able to get a little more time to work on the changes to the test file and got the bugs fixed, so the tests all pass the update date picker spin button example. |
Updated the documentation and test cases, so ready for further review. |
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.
Tests look good, just one suggestion that is not necessary right now :)
const valuesMonth = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']; | ||
|
||
|
||
var getDaysInMonth = function (year, month) { |
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.
to get the days in month, you could replace this logic with:
let d = new Date(year, month+1, 0);
return d.getDate();
…ia-valuetext for year spinbutton
…example to make the increase and decrease buttons real buttons to support touch devices
…ub.com/w3c/aria-practices into issue125-spinbutton-datepicker-example
Adds a spin button example to resolve issue #125. The example demonstrates using spin buttons to build a date picker.
Preview Link
View WIP on spin button date picker
Preview | Diff