ioscordovaswiftuiwkwebview

Why is dictation not working in a WKWebView field?


I have an iOS application hosting a WKWebView. Dictation is required on text fields, however the microphone keyboard accessory to start dictation is not appearing.

For ordinary iOS applications SwiftUI or UIKit it does. Why is this and how can I fix it?


Solution

  • It appears that dictation is only supported for WKWebView html input elements that are of type text.

    This field will be provided with the dictation keyboard accessory:

    <input type="text" . . . >

    This field will not:

    <input type="email" . . . >