Contact emails
darwi...@chromium.org
Explainer
https://github.com/w3c/secure-payment-confirmation/issues/343
Specification
https://w3c.github.io/secure-payment-confirmation/#dom-securepaymentconfirmationrequest-locale
Design docs
https://github.com/w3c/secure-payment-confirmation/issues/343https://github.com/w3c/i18n-request/issues/324https://github.com/w3c/secure-payment-confirmation/pull/345
Summary
Updates Secure Payment Confirmation's `locale` data field to return a Not Supported DOMException if none of the language tags provided in the field match the language used by the Secure Payment Confirmation's dialog. If the field is not set or empty, this validation is skipped.
This helps web developers with matching the language of the data that they are supplying to Secure Payment Confirmation with the dialog.
Blink component
Blink>Payments
Web Feature ID
secure-payment-confirmation
Motivation
This feature amends Secure Payment Confirmation so that web developers can align the language of data elements that they supply to Secure Payment Confirmation with the language used by the Secure Payment Confirmation dialog.
Currently web developers can provide a list of language tags for Secure Payment Confirmation to use in their dialog. But Secure Payment Confirmation does not use this list because it is not feasible for the browser to support all languages and the Secure Payment Confirmation is a browser feature so it should use the browser language to be consistent with other browser features.
By returning an error when none of the language tags provided match Secure Payment Confirmation's language, web developers are able to retry with different language tags (while updating the language of their supplied data elements) until they get a match.
Initial public proposal
https://github.com/w3c/secure-payment-confirmation/issues/343
Search tags
spc
TAG review
No information provided
TAG review status
Not applicable
Goals for experimentation
None
Risks
Debuggability
Web developers should be able to create Secure Payment Confirmation requests with or without matching locales, thus no changes are needed in devtools.
Will this feature be supported on all six Blink platforms
(Windows, Mac, Linux, ChromeOS, Android, and Android WebView)?
No
The locale validation will only be added to platforms that support Secure Payment Confirmation which are currently only Android, macOS, and Windows.
No
Web platform tests are in development. They are delayed due to the lack of support to change the browser locale language which is needed for this feature.
Flag name on about://flags
enable-spc-locale-validation
Finch feature name
SecurePaymentConfirmationLocaleValidation
Rollout plan
Will ship enabled for all users
Requires code in //chrome?
False
Tracking bug
https://crbug.com/535278878
Launch bug
https://launch.corp.google.com/launch/4489220
Measurement
A new SecurePaymentConfirmation.LocaleOutcome will be created and used to track the usage and outcomes (match vs no-match) of the field.
Availability expectation
The locale validation for Secure Payment Confirmation will only be available in Chromium browsers for the foreseeable future.
Estimated milestones
| Shipping on desktop | 154 |
| Shipping on Android | 154 |
Anticipated spec changes
Open questions about a feature may be a source of future web compat or
interop issues. Please list open issues (e.g. links to known github
issues in the project for the feature specification) whose resolution
may introduce web compat/interop risk (e.g., changing to naming or
structure of the API in a non-backward-compatible way).
https://github.com/w3c/i18n-request/issues/324
https://github.com/w3c/secure-payment-confirmation/issues/343
https://github.com/w3c/secure-payment-confirmation/pull/345
Link to entry on the Chrome Platform Status
https://chromestatus.com/feature/5126146013396992?gate=4803300429004800
Links to previous Intent discussions
Intent to Prototype:
https://groups.google.com/a/chromium.org/d/msgid/blink-dev/6a7ccbd5.dc132f77.2e13a8.0cd1.GAE%40google.com