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

aria-valid-attr-value: allow numbers with comma as decimal separator #2450

Closed
placetobejohan opened this issue Aug 14, 2020 · 3 comments
Closed

Comments

@placetobejohan
Copy link

Numbers that use a comma as decimal separator - eg aria-valuenow="68885,8" - now trigger the [aria-*] attributes do not have valid values error.

I wonder if it's possible to allow the comma as a decimal separator, perhaps based on the current UI culture?

@WilcoFiers
Copy link
Contributor

Hey @placetobejohan, using comma as decimal separator doesn't work. Browsers will just ignore whatever comes after the comma. You have to use a dot, not a comma. The ARIA spec defers handling of numbers to HTML, which unfortunately doesn't have a definition of number, but browsers seem be consistent in using JavaScript's praseFloat method for this.

You can read the definition of it here:
https://www.w3.org/TR/wai-aria-1.1/#state_property_processing

And here's the list of defined types for HTML:
https://infra.spec.whatwg.org/#index-defined-here

@placetobejohan
Copy link
Author

placetobejohan commented Aug 14, 2020

Hi @WilcoFiers ,

Perhaps I should've been more specific or I came to the wrong conclusion.

The issue I have is that elements like this one

<input type="text" class="k-formatted-value numeric k-input" title="0,3400 €" tabindex="0" role="spinbutton" aria-valuemin="0" autocomplete="off" aria-disabled="true" disabled="disabled" aria-valuenow="0,34" style="display: inline-block;">

are marked with invalid value. What could be the reason for this?

Could it be related to the use of a Kendo numeric textbox?

Thanks for your help.

@placetobejohan
Copy link
Author

The issue seems to be with kendo here, they should generate a valid aria-valuenow independent of which culture is being used.

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

No branches or pull requests

2 participants