Skip to content

Commit

Permalink
change initialization method to 'new Accessibility()'
Browse files Browse the repository at this point in the history
  • Loading branch information
ranbuch committed Oct 3, 2016
1 parent 3c8c1d4 commit e581bd5
Show file tree
Hide file tree
Showing 6 changed files with 729 additions and 605 deletions.
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

### beta version!
* first copy and past /dist/accessibility.min.js to your site (via dev tools)
* then enter `window.Accessibility.init();`
* then enter `new window.Accessibility();`
* works for your site? use it! not working? open an issue or request a feature

### DESCRIPTION:
Expand All @@ -28,7 +28,7 @@ include script:
`<script type="text/javascript" src="node_modules/accessibility/dist/accessibility.min.js"></script>`
initialize component:
`window.addEventListener('load', function() {
window.Accessibility.init();
new window.Accessibility();
}, false);`

### LIMITATIONS:
Expand All @@ -50,7 +50,7 @@ initialize component:

`var options = { labels: labels };`
`options.textToSpeechLang = 'en-US'; // or any other language`
`window.Accessibility.init(options);`
`new window.Accessibility(options);`

### disable features example:
`options.modules = {`
Expand All @@ -68,4 +68,7 @@ initialize component:
### text size manipulation approaches
If text increase / decrease isn't working for your size your probablly not using responsive font size units (sutch as em, rem etc.).
In that case you can initialize the accessibility tool like this:
`Accessibility.init({textPixelMode: true})`
`new window.Accessibility({textPixelMode: true})`

### LICENSE
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)](https://spdx.org/licenses/MIT)
2 changes: 1 addition & 1 deletion dist/accessibility.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "accessibility",
"version": "0.0.10",
"version": "0.1.0",
"description": "add accessibility to your website",
"main": "accessibility.js",
"scripts": {
Expand Down
Loading

0 comments on commit e581bd5

Please sign in to comment.