Skip to content

Commit

Permalink
Update metadata for speechinput test
Browse files Browse the repository at this point in the history
Add `warnings` about:
* The Speech Input API being deprecated in favor of the Web Speech API.
* Chrome, the only browser that implemented the Speech Input API,
  planing to deprecate and remove the related code.
  • Loading branch information
alrra committed Sep 14, 2013
1 parent 2e0a658 commit 2252043
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions feature-detects/forms/speechinput.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
/*!
{
"name": "Speech Input for inputs",
"name": "Speech Input API",
"property": "speechinput",
"tags": ["forms", "speech", "attribute"],
"authors": ["@alrra"],
"authors": ["Cătălin Mariș"],
"knownBugs": [
"This detect only checks the webkit version because the speech attribute is likely to be deprecated in favor of a JavaScript API."
"This detect only checks the webkit version because the Speech Input API was only implemented in Chrome and it was deprecated in favor of the Web Speech API."
],
"notes": [{
"name": "Future (but unsupported) Spec",
"href": "http://lists.w3.org/Archives/Public/public-webapps/2011OctDec/att-1696/speechapi.html"
}]
"name": "W3C Speech Input API Specification",
"href": "http://lists.w3.org/Archives/Public/public-xg-htmlspeech/2011Feb/att-0020/api-draft.html"
}],
"warnings": [
"Do not use the Speech Input API as it was deprecated in favor of the Web Speech API.",
"Only Chrome ever implemented this API, and they are planning to deprecate and remove the related code: https://code.google.com/p/chromium/issues/detail?id=223198."
]
}
!*/
define(['Modernizr', 'createElement'], function( Modernizr, createElement ) {
Expand All @@ -19,8 +23,6 @@ define(['Modernizr', 'createElement'], function( Modernizr, createElement ) {
// It can return false even if they have support for speech i.imgur.com/2Y40n.png
// Testing with 'onwebkitspeechchange' seems to fix this problem.

// FIXME: add support for detecting the new spec'd behavior

Modernizr.addTest('speechinput', function() {
var elem = createElement('input');
return 'speech' in elem || 'onwebkitspeechchange' in elem;
Expand Down

0 comments on commit 2252043

Please sign in to comment.