mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-20 15:34:26 +08:00
feat(core): first class a11y support (#8909)
This commit is contained in:

committed by
Nathan Walker

parent
ef9c3b1f5f
commit
c46da3fad9
24
packages/core/ui/slider/index.d.ts
vendored
24
packages/core/ui/slider/index.d.ts
vendored
@ -1,10 +1,14 @@
|
||||
import { View } from '../core/view';
|
||||
import { Property, CoercibleProperty } from '../core/properties';
|
||||
import { EventData } from '../../data/observable';
|
||||
|
||||
/**
|
||||
* Represents a slider component.
|
||||
*/
|
||||
export class Slider extends View {
|
||||
static readonly accessibilityDecrementEvent = 'accessibilityDecrement';
|
||||
static readonly accessibilityIncrementEvent = 'accessibilityIncrement';
|
||||
|
||||
/**
|
||||
* Gets the native [android widget](http://developer.android.com/reference/android/widget/SeekBar.html) that represents the user interface for this component. Valid only when running on Android OS.
|
||||
*/
|
||||
@ -29,6 +33,11 @@ export class Slider extends View {
|
||||
* Gets or sets a slider max value. The default value is 100.
|
||||
*/
|
||||
maxValue: number;
|
||||
|
||||
/**
|
||||
* Increase/Decrease step size for iOS Increment-/Decrement events
|
||||
*/
|
||||
accessibilityStep: number;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -45,3 +54,18 @@ export const minValueProperty: Property<Slider, number>;
|
||||
* Represents the observable property backing the maxValue property of each Slider instance.
|
||||
*/
|
||||
export const maxValueProperty: CoercibleProperty<Slider, number>;
|
||||
|
||||
/**
|
||||
* Represents the observable property backing the accessibilityStep property of each Slider instance.
|
||||
*/
|
||||
export const accessibilityStepProperty: Property<SliderBase, number>;
|
||||
|
||||
interface AccessibilityIncrementEventData extends EventData {
|
||||
object: Slider;
|
||||
value?: number;
|
||||
}
|
||||
|
||||
interface AccessibilityDecrementEventData extends EventData {
|
||||
object: Slider;
|
||||
value?: number;
|
||||
}
|
||||
|
Reference in New Issue
Block a user