Skip to content

Renderer plugin for interaction accessibility for end-users with physical impairments which require screen-renders

License

Notifications You must be signed in to change notification settings

ant-tinyjs/tinyjs-plugin-accessibility

Repository files navigation

tinyjs-plugin-accessibility

提供给特殊人群的可访问性渲染插件

Renderer plugin for interaction accessibility for end-users with physical impairments which require screen-renders

查看demo

http://tinyjs.net/plugins/tinyjs-plugin-accessibility.html#demo

引用方法

起步

首先当然是要引入,推荐NPM方式,当然你也可以使用CDN或下载独立版本,先从几个例子入手吧!

1、最简单的例子

引用 Tiny.js 源码

<script src="https://gw.alipayobjects.com/os/lib/tinyjs/tiny/1.5.1/tiny.js"></script>
require('tinyjs-plugin-accessibility');
// 或者
// import 'tinyjs-plugin-accessibility';

var app = new Tiny.Application({..});
// 全部开启无障碍
app.renderer.plugins.accessibility.activate({
  debug: true,
  eventType: 'touchstart',
});
var acReader = true; // 通过接口或 userAgent 自行判断是否已开启无障碍模式
// 自动激活可访问性
Tiny.accessibility.autoActivate(app, {
  eventType: 'touchstart',
}, {
  acReader,
});

依赖

API文档

http://tinyjs.net/plugins/tinyjs-plugin-accessibility.html#docs

About

Renderer plugin for interaction accessibility for end-users with physical impairments which require screen-renders

Resources

License

Stars

Watchers

Forks

Packages

No packages published