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

More precise inputmode-keyword-decimal definition (minus, dot, comma) #7497

Open
HolgerJeromin opened this issue Jan 17, 2022 · 5 comments
Open

Comments

@HolgerJeromin
Copy link

https://html.spec.whatwg.org/multipage/interaction.html#attr-inputmode-keyword-decimal

decimal: The user agent should display a virtual keyboard capable of fractional numeric input. Numeric keys and the format separator for the locale should be shown.

Currently we have no hint for entering negative values in the spec.
Furthermore we could have a definition what is "the locale" here. For example if the input element has lang="en" the keyboard could/should show a dot instead of a comma on German phones.

Current observation in the wild:
Android keyboard shows minus, dot and comma.
iOS keyboard has no minus and dot/comma depending on the user agent locale.

@HolgerJeromin
Copy link
Author

Is this something for web-platform-tests/interop#9 ?

@annevk
Copy link
Member

annevk commented Feb 16, 2022

The current text is somewhat ambiguous. I agree that ideally it's based on the language of the element, but the current text reads more like it's about the language that the end user uses. I believe that's not consistent with what we do elsewhere so I'd consider this a bug.

As such it's also not a "web compat" issue and web-platform-tests/interop#11 doesn't seem to include this feature. It's also hard to test automatically.

If I were to fix this I'd start with clarifying the specification to derive the locale from the language of the element. And then file implementation bugs.

cc @whatwg/forms @mfreed7

@HolgerJeromin
Copy link
Author

Thanks for your answer.
Please to not forget negative numbers. That was the final point why we needed to drop the attribute in our application.

@HolgerJeromin

This comment was marked as duplicate.

@HolgerJeromin

This comment was marked as duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants