mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
feat(core): first class a11y support (#8909)
This commit is contained in:
committed by
Nathan Walker
parent
577b1e9dad
commit
f2e21a50a7
@@ -2,11 +2,15 @@ import { Button as ButtonDefinition } from '.';
|
||||
import { TextBase } from '../text-base';
|
||||
import { CSSType } from '../core/view';
|
||||
import { booleanConverter } from '../core/view-base';
|
||||
import { AccessibilityRole } from '../../accessibility';
|
||||
|
||||
@CSSType('Button')
|
||||
export abstract class ButtonBase extends TextBase implements ButtonDefinition {
|
||||
public static tapEvent = 'tap';
|
||||
|
||||
accessible = true;
|
||||
accessibilityRole = AccessibilityRole.Button;
|
||||
|
||||
get textWrap(): boolean {
|
||||
return this.style.whiteSpace === 'normal';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user