https://github.com/springload/accessible-focus-styles
Control focus styles in an accessible manner - remove outlines for clicks, keep them for keyboard navigation
https://github.com/springload/accessible-focus-styles
accessibility css focus vanilla-javascript
Last synced: 11 months ago
JSON representation
Control focus styles in an accessible manner - remove outlines for clicks, keep them for keyboard navigation
- Host: GitHub
- URL: https://github.com/springload/accessible-focus-styles
- Owner: springload
- Created: 2017-08-16T09:49:43.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-09-01T10:31:48.000Z (over 8 years ago)
- Last Synced: 2025-03-01T16:38:28.252Z (12 months ago)
- Topics: accessibility, css, focus, vanilla-javascript
- Language: JavaScript
- Homepage: https://springload.github.io/accessible-focus-styles/
- Size: 41 KB
- Stars: 0
- Watchers: 20
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# [accessible-focus-styles](https://springload.github.io/accessible-focus-styles/) [](https://www.npmjs.com/package/accessible-focus-styles) [](https://travis-ci.org/springload/accessible-focus-styles) [](https://coveralls.io/github/springload/accessible-focus-styles)
> Control focus styles in an accessible manner - remove outlines for clicks, keep them for keyboard navigation. Check out our [online demo](https://springload.github.io/accessible-focus-styles/)!
## Usage
```sh
npm install --save accessible-focus-styles
```
### Initial setup
Is really simple.
```js
import initAccessibleFocus from 'accessible-focus-styles';
initAccessibleFocus();
```
## Development
### Install
> Clone the project on your computer, and install [Node](https://nodejs.org). This project also uses [nvm](https://github.com/creationix/nvm).
```sh
nvm install
# Then, install all project dependencies.
npm install
```
### Releases
- Make a new branch for the release of the new version.
- Update the [CHANGELOG](CHANGELOG.md).
- Update the version number in `package.json`, following semver.
- Make a PR and squash merge it.
- Back on master with the PR merged, follow the instructions below.
```sh
npm run dist
# Use irish-pub to check the package content. Install w/ npm install -g first.
irish-pub
npm publish
```
- Finally, go to GitHub and create a release and a tag for the new version.
- Done!