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

Date picker spin button example broken in Safari #1151

Closed
backwardok opened this issue Aug 29, 2019 · 6 comments
Closed

Date picker spin button example broken in Safari #1151

backwardok opened this issue Aug 29, 2019 · 6 comments
Labels
bug Code defects; not for inaccurate prose Example Page Related to a page containing an example implementation of a pattern

Comments

@backwardok
Copy link
Contributor

The example for the spinbutton role works well in Chrome, but has a javascript error in Safari.

On load, there's a SyntaxError: The string did not match the expected pattern. on this line in spinbutton-date.js:
domNode.querySelector('[role="spinbutton');

My guess is that Chrome is being generous with the selector here and Safari is breaking because it's technically an invalid selector. It should be domNode.querySelector('[role="spinbutton]'); (it was missing the closing right bracket)

@JAWS-test
Copy link

JAWS-test commented Aug 29, 2019

Further problems at https://www.w3.org/TR/wai-aria-practices/examples/spinbutton/datepicker-spinbuttons.html and http://w3c.github.io/aria-practices/examples/spinbutton/datepicker-spinbuttons.html:

  • When increasing the number for the day over 31, "NaN" is displayed.
  • When decreasing number for the day below 1, the top number freezes at 31 and the two bottom numbers become negative.
  • If you press End or Home for the year, "NaN" is also displayed.

(tested with Chrome and Firefox, Windows 8)

@JAWS-test
Copy link

JAWS-test commented Aug 29, 2019

JAWS outputs: "To set the value use the Arrow keys or type the value", because normally free text input in spin button fields is possible. But not here. Maybe readonly has to be used? Or should text input be made possible?

@backwardok
Copy link
Contributor Author

Verified that the issue was not happening in Chrome, Firefox, and Edge, but is also happening in IE11. Working on a fix for this specific issue

@JAWS-test can you file separate issues for the other things you're finding?

@backwardok
Copy link
Contributor Author

@JAWS-test made a fix for the issue with the NaN: #1154

@JAWS-test
Copy link

@backwardok

can you file separate issues for the other things you're finding?

#1155

Thank you so much for fixing the other problems so quickly!

@mcking65 mcking65 added bug Code defects; not for inaccurate prose Example Page Related to a page containing an example implementation of a pattern labels Aug 31, 2019
@mcking65 mcking65 added this to the 1.2 Third Working Draft milestone Aug 31, 2019
mcking65 pushed a commit that referenced this issue Aug 31, 2019
Resolves issue #1151. The query selector for the `spinbutton` element was incomplete, which caused it to not query properly in Safari or IE.

This fix adds in the missing characters to the query so that it queries properly.
@mcking65
Copy link
Contributor

Thanks to @backwardok, this is fixed with commit e451c93!

michael-n-cooper pushed a commit that referenced this issue Aug 31, 2019
Date Picker Spin Button Example: fix  query selector (pull #1153)

Resolves issue #1151. The query selector for the `spinbutton` element was incomplete, which caused it to not query properly in Safari or IE.

This fix adds in the missing characters to the query so that it queries properly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Code defects; not for inaccurate prose Example Page Related to a page containing an example implementation of a pattern
Development

No branches or pull requests

3 participants