feat(combobox, slider, picker-button, number-field): optional haptic feedback for accessibilityeedback on webkit api#6066
feat(combobox, slider, picker-button, number-field): optional haptic feedback for accessibilityeedback on webkit api#6066aramos-adobe wants to merge 1 commit intomainfrom
Conversation
|
📚 Branch Preview Links🔍 First Generation Visual Regression Test ResultsWhen a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:
Deployed to Azure Blob Storage: If the changes are expected, update the |
Description
Adds optional haptic feedback to four 1st-gen components (Combobox, Slider, Picker Button, Number Field) for better accessibility on supported mobile devices.
hapticFeedback(boolean, defaultfalse), attributehaptic-feedback.navigator.vibrate(16)) when available.label.click()to leverage system haptics when Vibration API is not supported.opacity: 0,appearance: none, andpointer-events: noneare applied only to the native switch input (#haptic-trigger), so the label remains programmatically clickable for haptics without showing the control.Motivation and context
Haptic feedback improves usability and accessibility on touch devices by confirming interactions (e.g., list open, selection, value change) without relying solely on visual or auditory feedback. This change keeps haptics opt-in so existing apps are unchanged and authors can enable it where it adds value.
Related issue(s)
Screenshots (if appropriate)
N/A — behavior is haptic and/or visible only when
haptic-feedbackis set and tested on a supporting device/emulator.Author's checklist
Reviewer's checklist
patch,minor, ormajorfeaturesManual review test cases
Combobox — haptic feedback
haptic-feedback).Slider — haptic feedback
haptic-feedback).Picker Button — haptic feedback
haptic-feedback).Number Field — haptic feedback and hidden switch
haptic-feedback).Number Field — default (no haptics)
haptic-feedback(default).Device review
Accessibility testing checklist
Required: Complete each applicable item and document your testing steps (replace the placeholders with your component-specific instructions).
Keyboard (required — document steps below) — What to test for: Focus order is logical; Tab reaches the component and all interactive descendants; Enter/Space activate where appropriate; arrow keys work for tabs, menus, sliders, etc.; no focus traps; Escape dismisses when applicable; focus indicator is visible.
Screen reader (required — document steps below) — What to test for: Role and name are announced correctly; state changes (e.g. expanded, selected) are announced; labels and relationships are clear; no unnecessary or duplicate announcements.
haptic-feedbackenabled.