Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/swiecaJS/vue-a11y-click
https://github.com/swiecaJS/vue-a11y-click
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/swiecaJS/vue-a11y-click
- Owner: swiecaJS
- License: mit
- Created: 2019-05-01T09:51:06.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-05-01T10:46:56.000Z (almost 6 years ago)
- Last Synced: 2024-10-31T06:18:59.521Z (3 months ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
- License: LICENSE
Awesome Lists containing this project
- awesome-a11y-vue - vue-a11y-click - It helps you handling click events on element which are not natively clickable... (Components and plugins / Courses)
- awesome-access - vue-a11y-click - It helps you handling click events on element which are not natively clickable... (Components and plugins / Courses)
README
# vue-a11y-click
`. This package provides custom directive which will add `tabindex` attribute to an element. Then it will trigger `click` event when focused and user press `enter`. In addition it will change `aria-pressed` property.
It helps you handling click events on element which are not natively clickable - like `` or `## Install
#### NPM
```shell
npm install -S vue-a11y-click
```#### Yarn
```shell
yarn add vue-a11y-click
```## How to use
In your `main.js`
```javascript
import Vue from 'vue'
import VueA11YClick from 'vue-a11y-click'Vue.use(VueA11YClick)
```Then you can use it in component
```vue
export default {
name: 'BaseCard',
methods: {
handleClick() {
// ...
}
}
//...
}```
## Using with HTML files
```html
Vue.use(VueSkipTo)
new Vue({
el: "#app",
})