codeandtheory / ystepper-ios

Accessible and customizable shopping cart-style stepper for iOS.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement "Adjustable" trait for improved accessibility.

WestonHanners opened this issue · comments

In order to improve our voice over support for this control, we should make this an Adjustable element.

First, we want to disable accessibility for the sub elements and enable it at the control level. I believe you can control this by just setting the "isAccessibilityElement" boolean.

Second, we need to implement 2 functions.

func accessibilityIncrement()
func accessibilityDecrement()

These should call the same function as the buttons. You also need to make sure that the accessibilityValue property is being modified

Third, set the trait for the control to ".adjustable"

In the end, this should be a single accessibility element for the whole slider, with the trait adjustable. You can swipe up and down to change the value.

This should behave similar to UISlider