ionic-team / ionic-framework

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
https://ionicframework.com
MIT License
50.47k stars 13.53k forks source link

feat(picker): picker column is easier to select with assistive technology #29371

Closed liamdebeasi closed 2 weeks ago

liamdebeasi commented 3 weeks ago

Issue number: resolves #25221


What is the current behavior?

The wheel picker is hard to use with screen readers because users need to manually swipe over every option. Not only is this tedious, it also means it's impossible to move between columns/leave the picker by swiping only because the act of swiping selects a value.

What is the new behavior?

We did investigations into how native handles the wheel picker, and both iOS and Android do it differently. Unfortunately, neither of those patterns can be implemented exactly using web tech (at least not without a lot of brittle/hacky code).

As a result, we settled on a solution that follows web accessibility best practices and addresses the original issue:

Note: Chrome currently does not synthesize keyboard events. However, this is something that could be fixed in the future (since Chrome is not following the spec right now). Android users can double tap to slide up/down in the meantime.

Does this introduce a breaking change?

Other information

Dev build: 8.0.0-dev.11713893672.15a2b23e

Reviews: Please test this on iOS and Android!

I recommend testing on src/components/datetime/test/prefer-wheel since it lets you the core functionality as well as the datetime-specific integrations (the aria labels)

Docs PR: https://github.com/ionic-team/ionic-docs/pull/3612

vercel[bot] commented 3 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ionic-framework ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 24, 2024 2:43pm