Bug 233449 - AX: range input does not fire input event when incremented/decremented via accessibility APIs
Summary: AX: range input does not fire input event when incremented/decremented via ac...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: Safari 15
Hardware: All All
: P2 Normal
Assignee: Tyler Wilcock
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-11-23 09:22 PST by Weston Thayer
Modified: 2024-04-07 12:13 PDT (History)
12 users (show)

See Also:


Attachments
Basid range input logging input and change events (1.06 KB, text/html)
2021-11-23 09:22 PST, Weston Thayer
no flags Details
Patch (5.44 KB, patch)
2024-04-06 22:47 PDT, Tyler Wilcock
no flags Details | Formatted Diff | Diff
Patch (6.09 KB, patch)
2024-04-07 08:23 PDT, Tyler Wilcock
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Weston Thayer 2021-11-23 09:22:00 PST
Created attachment 445036 [details]
Basid range input logging input and change events

<input type=range> does not fire the 'input' event when using the OS accessibility action APIs to increment/decrement it's value. Both macOS and iOS VoiceOver use the increment/decrement actions. This can break code that relies on only the 'input' event to respond to the range input changing values.

1. Open either the attached chromebug-1272108.html or https://westonthayer.github.io/hosting/chromebug-1272107.html in Safari
2. Open Xcode Accessibility Inspector
3. Select the range input (you can use Accessibility Inspector's Point to Inspect crosshairs)
4. Accessibility Inspector's inspected element should have type: slider
5. Expand Accessibility Inspector's Actions menu and perform either the 'increment' or 'decrement' actions

Expected result:
The log below the range input should show both "input: NEW_VALUE" and "change: NEW_VALUE", just as it does if you use the mouse or keyboard to change the range input's value.

Actual result:
The log only shows "change: NEW_VALUE".
Comment 1 Radar WebKit Bug Importer 2021-11-23 09:22:13 PST
<rdar://problem/85707481>
Comment 2 Weston Thayer 2021-11-23 09:25:57 PST
I believe firing 'input' is required by the HTML spec: https://html.spec.whatwg.org/multipage/indices.html#event-input
Comment 3 Curtis Wilcox 2024-02-11 12:47:04 PST
This is still a problem on macOS 14.3 with Safari 17.3 and on iOS 17.3.1.

In practice, it's less of an issue with macOS as users likely change the value with up, down, left, right arrows without a modifier, triggering both events as any keyboard user would. The problem can still be replicated by navigating "In slider" (VO+Shift+down arrow) then using VO+up, down, left, right arrows; 'change' events are triggered but 'input' events are not.
Comment 4 Tyler Wilcock 2024-04-06 22:47:50 PDT
Created attachment 470797 [details]
Patch
Comment 5 Tyler Wilcock 2024-04-07 08:23:53 PDT
Created attachment 470801 [details]
Patch
Comment 6 EWS 2024-04-07 12:13:43 PDT
Committed 277182@main (87dc85177fd8): <https://commits.webkit.org/277182@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 470801 [details].