Web Notifications implementation report

This is an implementation report for the Web Notifications specification.

There is a comprehensive test suite for testable requirements in the Web Notifications spec, and the complete set of test results document that there are two independent implementations (in Chrome and/or Firefox and/or Safari) of all UA requirements in the spec—with the exception of the following:

  1. lack of complete conformance to the WebIDL interface definitions in the spec
  2. a particular corner-case requirement in the spec of handling of invalid values of lang property, for which the results are complete failures in all implementing UAs.

Regarding the lack of complete conformance to the WebIDL interface definitions in the spec, that is not an issue unique to this particular spec and in fact is a common issue among a number of specs that have already been published a Recommendations, so the Director has already determined that particular conformance issue need not prevent any spec from proceeding to Rec.

Regarding that corner-case requirement in the spec of handling of invalid values of lang property, the details about that requirement are as follows:

Step 4 at http://www.w3.org/TR/notifications/#dom-notification states a UA requirement with regard to the value of the Notification.lang property, whose purpose is to convey the language of a notification. That step reads, “If options’s lang is a valid BCP 47 language tag, or the empty string, set notification’s language to options’s lang, or set it to the empty string otherwise.”

Restated, if a Web application tries to set a lang value that is not a valid BCP 47 language tag, then according to the spec, the UA should set the actual lang property to the empty string.

The actual behavior in all UAs is that that if you use a valid BCP 47 language tag, the UAs behave as you would expect, and set the notification’s language value to the BCP 47 language tag you indicated.

However, if you use a string that is an invalid BCP 47 language tag, no UA follows the spec requirement to set the notification’s language value to the empty string.

Instead it’s all just basically “garbage in, garbage out”: If you use the string “Latn-de”, the UAs will set the notification’s lang value to exactly that—without checking whether it’s a valid BCP 47 value.

So this isn’t really a problem in the normal case, since if Web developers have their Web applications use valid BCP 47 language tags to begin with, everything will work as expected. (And if they set a value that’s not a valid BCP 47 language tag, things aren’t going to work as expected for end users—regardless of what UAs do with it.)

Given that the lang requirement in question emerged originally from discussions with the Internationalization Core (i18n-core) WG, the lack of implementation support was discussed with the i18n-core WG and the resolution of the discussion was essentially that the requirement could be changed in the next (essentially v2) version of the spec, which is already in development (and implicitly that UAs which had already implemented the spec could safely continue to this particular requirement in the v1 spec, as they are already doing now; and further that since we don't expect any further implementations of the v1 spec, that no change to the v1 spec was necessary).

A combined record of tests results for the two conformance cases described above (the WebIDL conformance issue, and the corner-case requirement for handling of invalid values of lang property is also available.

Finally, it should be noted that neither Microsoft IE nor Microsoft Edge implement any support at all for this version of the Web Notifications spec.