Skip to content
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

fix: Spin Button Date tests and sync spec to current behaviour #1640

Merged
merged 12 commits into from
Jan 10, 2021

Conversation

nschonni
Copy link
Contributor

@nschonni nschonni commented Dec 1, 2020

#1426 suggests that the behaviour should be updated in the future.
This enables the tests reliably and adds the current undocumented behaviour in the example around some keystrokes.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 1, 2020

Regression test coverage:

Examples without any regression tests:

  • dialog-modal/alertdialog.html

Examples missing some regression tests:

  • dialog-modal/datepicker-dialog.html:
    • textbox-aria-describedby
  • menu-button/menu-button-actions-active-descendant.html:
    • menu-up-arrow
    • menu-down-arrow
    • menu-character
  • toolbar/toolbar.html:
    • toolbar-tab
    • toolbar-right-arrow
    • toolbar-left-arrow
    • toolbar-home
    • toolbar-end
    • toolbar-toggle-esc
    • toolbar-toggle-enter-or-space
    • toolbar-radio-enter-or-space
    • toolbar-radio-down-arrow
    • toolbar-radio-up-arrow
    • toolbar-button-enter-or-space
    • toolbar-menubutton-enter-or-space-or-down-or-up
    • toolbar-menu-enter-or-space
    • toolbar-menu-down-arrow
    • toolbar-menu-up-arrow
    • toolbar-menu-escape
    • toolbar-spinbutton-down-arrow
    • toolbar-spinbutton-up-arrow
    • toolbar-spinbutton-page-down
    • toolbar-spinbutton-page-up
    • toolbar-checkbox-space
    • toolbar-link-enter-or-space
    • toolbar-spinbutton-role

Example pages with Keyboard or Attribute table rows that do not have data-test-ids:

  • dialog-modal/alertdialog.html
    • "Keyboard Support" table(s):
      • Tab
      • Shift + Tab
      • Escape
      • Command + S
      • Control + S
    • "Attributes" table(s):
      • alertdialog
      • aria-labelledby=IDREF
      • aria-describedby=IDREF
      • aria-modal=true
      • alert

SUMMARY:

55 example pages found.
1 example pages have no regression tests.
3 example pages are missing approximately 27 out of approximately 780 tests.

ERROR - missing tests:

Please write missing tests for this report to pass.

@nschonni
Copy link
Contributor Author

nschonni commented Dec 1, 2020

/cc @spectranaut @mcking65

@nschonni nschonni force-pushed the spin-button-tests branch 2 times, most recently from b4dc90e to bea0560 Compare December 1, 2020 07:06
@mcking65
Copy link
Contributor

mcking65 commented Dec 1, 2020

Thank you @nschonni
I'd like to have @spectranaut take a look

Copy link
Contributor

@spectranaut spectranaut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks so much for the fixes to downarrow! But I don't think we should fix the failing tests related to page down and page up -- those tests are failing because the example code is incorrect, as is tracked in issue #1426. We don't want to have tests that pass because they don't run into the bug that currently exists in the example.

Can you revert the changes to page up/page down in this PR?

@nschonni
Copy link
Contributor Author

nschonni commented Dec 1, 2020

@spectranaut I've updated the spec and test to reflect the current behaviour, then #1426 can be used to update it to the new behaviour

Copy link
Contributor

@spectranaut spectranaut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As long as Matt is ok with the change in the description of the page up/page down on the spin button, then I approve this PR.

@nschonni
Copy link
Contributor Author

nschonni commented Dec 1, 2020

@spectranaut feel free to cherry pick part of the fix into #1639 if you think this might be slower to land and want to get the test green quicker 😄

@spectranaut
Copy link
Contributor

I cherry picked the first commit (Fix: Down arrow test) into this PR: #1639

So if you could drop it from this PR we can consider the rest of the changes :)

@nschonni
Copy link
Contributor Author

nschonni commented Dec 1, 2020

👍 when that one lands I'll rebase and it'll drop out. If i remove it now, the tests will fail 😄 . Although because of the GitHub Actions issues earlier today, there are a bunch of failures right now

@nschonni nschonni changed the title fix: Spinbutton day tests fix: Enable Spinbutton date tests and sync spec to current behaviour Dec 2, 2020
@nschonni nschonni changed the title fix: Enable Spinbutton date tests and sync spec to current behaviour fix: Spin Button Date tests and sync spec to current behaviour Dec 2, 2020
@mcking65
Copy link
Contributor

mcking65 commented Dec 3, 2020

Based on above comments and commits in #1639, I merged that one. Do we still need something from this PR?

@nschonni
Copy link
Contributor Author

nschonni commented Dec 3, 2020

@mcking65 the other PR had just the first commit from this PR, now gone because I rebased. The rest of the commits took a similar approach to enable the other tests marked failing and updated the example description to match the current behaviour. The flip side to these changes is that @spectranaut opened the issue #1426 because the current behaviour might not be what is wanted in the future.

@spectranaut
Copy link
Contributor

It would be nice to get some eyes on this change -- what is the preferred way for the spin button date picker to behave at month and year boundaries with "page up" and "page down"? Should it always move the spinner 5 up or 5 down? Or, once you get to within 5 of the last day or first day of the month, should it just jump the last or first day of the month?

What do you think, @carmacleod, @jongund ?

@nschonni
Copy link
Contributor Author

nschonni commented Dec 4, 2020

Opened #1653 as an alternate approach to change the rollover behaviour

@jongund
Copy link
Contributor

jongund commented Dec 4, 2020

@spectranaut @carmacleod
I think the buttons should not roll over, e.g. when increasing it should stop at the maximum value, when decreasing it should stop at the minimum value.

@mcking65
Copy link
Contributor

@jongund commented:

I think the buttons should not roll over, e.g. when increasing it should stop at the maximum value, when decreasing it should stop at the minimum value.

If we are going to change the behavior, let's make that a different issue and PR. Personally, in date pickers, I kind of like the ones where increasing the value just rolls time forward across boundaries, e.g., increasing day on Jan 31 changes date to Feb 1. However, stopping at boundaries is just as valid.

Jon, if you think we should have a discussion of the behavior, please raise an issue.

I'm going to go ahead with this PR so we at least have documentation and testing that matches the current behavior.

Copy link
Contributor

@mcking65 mcking65 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @nschonni!

I'd like to merge, but have some editorial suggestions to simplify the language.

examples/spinbutton/datepicker-spinbuttons.html Outdated Show resolved Hide resolved
examples/spinbutton/datepicker-spinbuttons.html Outdated Show resolved Hide resolved
examples/spinbutton/datepicker-spinbuttons.html Outdated Show resolved Hide resolved
examples/spinbutton/datepicker-spinbuttons.html Outdated Show resolved Hide resolved
@nschonni nschonni requested a review from mcking65 January 10, 2021 04:12
Copy link
Contributor

@mcking65 mcking65 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, ready to ship now!

@mcking65 mcking65 merged commit ee758b3 into w3c:master Jan 10, 2021
@nschonni nschonni deleted the spin-button-tests branch January 10, 2021 04:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants