question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Voice Control inserts spaces in input fields

See original GitHub issue

Issue: Voice Control inserts spaces in input fields. Platform: macOS 11.0.1 (20B29) Browser: Safari 14.0.1 (16610.2.11.51.8). (Only tested in the native browser, as other vendors will likely refuse to fix anyway.) Example page: Design System » Date input » Example Why: When the user inputs a value, Voice Control automatically inserts a leading space, leading to validation errors and a confused user. Suggest: Client-side trim of leading whitespace on blur() Example 1: Input of a date on the example page:

Insert the day with the keyboard as a baseline test: 11. Then switch to using Voice Control to enter the month and year.

“01” “Next field” “2021”

This actually tries to submit the following three values:

  1. "11"
  2. " 01"
  3. " 2021"

☝️ Note the leading spaces in the inputs where Voice Control was used. Visually, they’re barely noticeable, but these will cause validation issues and force the error state. Here’s a screenshot from Safari’s web inspector, showing those values.

Note the leading spaces in the inputs where Voice Control was used.

Example 2: Picking a country from the autocomplete:

France (No results) sigh “Select word. Delete previous character.” France (1 Result)

Note: This issue doesn’t occur on mobile devices, but only because Voice Control completely refuses to see the inputs on the example page.

  • iPadOS 14.3 (18C66)
  • iOS 14.3 (18C66)

iOS Voice Control not seeing the date inputs, example 1 iOS Voice Control not seeing the date inputs, example 2 iOS Voice Control not seeing the date inputs, example 3

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
36degreescommented, Jan 13, 2021

Having talked about this as a team, we think this is best addressed on the server-side by trimming or otherwise ignoring leading and trailing spaces as part of the validation process where appropriate. We think there’d be scope to add something about this to the ‘Help users to recover from validation errors’ pattern.

I’ve created an issue to represent this work – https://github.com/alphagov/govuk-design-system/issues/1450.

@philsherry it seems like this issue should be reported to Apple – have you raised a bug in Webkit / Radar?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use VoiceOver to hear whitespace on Mac - Apple Support (IE)
VoiceOver can indicate when text contains repeated spaces between words and at the end of a line. VoiceOver does not indicate single spaces....
Read more >
Not allowing to write spaces in input using Javascript
And I want to block the user to write spaces in one or more input fields. I can't sem to know how. EDIT:...
Read more >
Windows Speech Recognition commands - Microsoft Support
Learn how to control your PC by voice using Windows Speech Recognition commands for dictation, keyboard shortcuts, punctuation, apps, and more.
Read more >
<input>: The Input (Form Input) element - HTML
The <input> HTML element is used to create interactive controls for web-based forms in order to accept data from the user; a wide...
Read more >
Type with your voice - Google Docs Editors Help
To use voice typing or voice commands, your computer microphone needs to be on and working. Devices and microphones vary, so check your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found