-
Notifications
You must be signed in to change notification settings - Fork 350
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
Date Picker Dialog Example: Improve high contrast support and refactor javascript #1362
Conversation
@spectranaut @smhigley @mcking65 I updated the regression tests to fix the SPACE key issue in Issue #1358 |
Part of the regression test for the date picker is very slow to run. It's focusing each cell with half a second delay between each step. Do you know why it's slow?
Are the known failures intended to be failures still? |
@@ -696,7 +706,7 @@ ariaTest('SPACE on cancel button does not select date', exampleFile, 'okay-cance | |||
|
|||
await setDateToJanFirst2019(t); | |||
await t.context.session.findElement(By.css(ex.buttonSelector)).click(); | |||
await t.context.session.findElement(By.css(ex.currentlyFocusedButton)).sendKeys(Key.ARROW_RIGHT); | |||
await t.context.session.findElement(By.css(ex.currentlyFocusedDay)).sendKeys(Key.ARROW_RIGHT); | |||
await t.context.session.findElement(By.css(ex.cancelButton)).sendKeys(Key.SPACE); |
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.
Should all Key.SPACE
s be replaced with ' '
? Maybe we can lint it also?
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.
Sounds like a good 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.
I just did some testing and we can only do this when an keyboard event handler is associated with a button. So I think we should only use " "
technique when needed and use Key.SPACE
when it works correctly,
@zcorpan Your right there is not much difference, I am going to change the border to be dashed to see if it stands out more. |
@zcorpan I made some changes to focus styling and aria-selected styling that helps in high contrast, please review. |
The ARIA Authoring Practices (APG) Task Force just discussed The full IRC log of that discussion<carmacleod> Topic: Update menu button datepicker dialog example<carmacleod> github: https://github.com//issues/1362 |
I made some updates for high contrast support for dates and buttons in the dialog, can you review and comment on the changes. |
@jongund, I just wrapped up my editorial review and pushed some revisions. While reviewing, I found 2 more things we need to change before requesting final reviews.
|
@mcking65 |
@mcking65 |
@jongund wrote:
Yes, exactly. |
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.
Final editorial review complete: The documentation of the example is consistent with editorial guidelines, the relevant design patterns, and the ARIA spec, and it pmatches what is implemented in the code.
I also tested thoroughly with JAWS and NVDA in Chrome. As expected, based on our testing of the date picker combobox example, there are improvements needed by screen reader developers. There are deficiencies in screen reader support for abbr on TH when in a grid. And, the way NVDA reads a grid makes understanding a grid of numbers difficult.
The calendar button takes focus on page load. Do we want that? I found it a bit surprising. |
How can the user discover the shortcut keys? Should we have tooltips (@smhigley 😄 ?) on the change month/year buttons?
Or maybe the change month/year shortcuts can be added to the keyboard help text?
maybe change it to:
Come to think of it, should we change the word "Cursor" to "Arrow"? i.e. maybe some folks don't know what "Cursor" keys are?
Can anyone think of a more concise, but still understandable, way to write that sentence? |
If the user only types a 2-digit year, what do we want to happen? |
@carmacleod could we open a separate issue for those bugs? I'm in favor of keeping this PR to the changes Jon already outlined & merging it (and those changes look good to me, fwiw). Then we can have additional smaller PRs for each other bug :). |
@smhigley I'm happy to open new issues for the shortcuts and the 2-digit year. But the calendar button taking focus on page load is being introduced by this PR (here's the released example), so I think we should fix that one before it goes in? |
@carmacleod |
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.
Thanks, @jongund.
Looks good!
@carmacleod |
Date Picker Dialog Example: Improve high contrast support and refactor javascript (pull #1362) Resolves #1360 with the following changes: * Updates Javascript to use a single object. * Fixes space key issues in grid. * Improves high contrast support. Co-authored-by: Simon Pieters <[email protected]> Co-authored-by: Matt King <[email protected]>
Resolves #1360 with the following changes:
Preview link
View changes in the compare branch for this PR
Review checklist