Bug 220592

Summary: AX: Voice Control inserts leading spaces in input fields
Product: WebKit Reporter: Phil Sherry <philsherry>
Component: AccessibilityAssignee: Nobody <webkit-unassigned>
Status: RESOLVED MOVED    
Severity: Normal CC: bfulgham, oliver.byford, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 14   
Hardware: Mac (Intel)   
OS: macOS 11   
Attachments:
Description Flags
Web inspector showing the issue described in example 1.
none
Example 2: problem.
none
Example 2: user fixed. none

Description Phil Sherry 2021-01-13 08:28:29 PST
Created attachment 417536 [details]
Web inspector showing the issue described in example 1.

Why: When using Voice Control to input a value, a leading space is automatically inserted. On many forms, this might lead to a validation error. As the user didn’t insert this space, they are unaware of its existence and will be confused about why they’re seeing a validation error, or some other form of error. I would argue that this opens the doors to WCAG Guideline 3.3 – Input Assistance issues. 

Example 1: Input of a date on the example page:

Example page: [Design System » Date input » Example](https://design-system.service.gov.uk/components/date-input/default/index.html)

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. I’ll attach a screenshot from Safari’s web inspector, showing those values.

Example 2: Picking a country from an autocomplete:

Example page: [Accessible Autocomplete form example](https://alphagov.github.io/accessible-autocomplete/examples/form.html can you do)

To get this example working, use the keyboard to tab into the first input, delete the content so that the field is empty and ready to go.

> “Sweden”
> Sweden (No results)
> *sigh*
> “Select word. Delete previous character.”
> Sweden (1 Result)

Screenshots attached.
Comment 1 Radar WebKit Bug Importer 2021-01-13 08:28:38 PST
<rdar://problem/73152197>
Comment 2 Phil Sherry 2021-01-13 08:29:34 PST
Created attachment 417537 [details]
Example 2: problem.
Comment 3 Phil Sherry 2021-01-13 08:30:08 PST
Created attachment 417538 [details]
Example 2: user fixed.
Comment 4 Brent Fulgham 2022-02-10 19:34:19 PST
The fix for this issue was needed outside the WebKit project, therefore this is being resolved as 'Moved'.

This should now be fixed in shipping software.