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

Lists

README

        

# vue-a11y-click
It helps you handling click events on element which are not natively clickable - like `` or `

`. 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.

## 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",
})