{"id":13635348,"url":"https://github.com/swiecaJS/vue-a11y-click","last_synced_at":"2025-04-19T03:34:51.749Z","repository":{"id":57394337,"uuid":"184397153","full_name":"swiecaJS/vue-a11y-click","owner":"swiecaJS","description":null,"archived":false,"fork":false,"pushed_at":"2019-05-01T10:46:56.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-18T15:56:22.022Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/swiecaJS.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-01T09:51:06.000Z","updated_at":"2023-07-02T14:39:09.000Z","dependencies_parsed_at":"2022-09-10T02:24:06.051Z","dependency_job_id":null,"html_url":"https://github.com/swiecaJS/vue-a11y-click","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swiecaJS%2Fvue-a11y-click","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swiecaJS%2Fvue-a11y-click/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swiecaJS%2Fvue-a11y-click/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swiecaJS%2Fvue-a11y-click/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/swiecaJS","download_url":"https://codeload.github.com/swiecaJS/vue-a11y-click/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249600552,"owners_count":21297716,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T00:00:44.289Z","updated_at":"2025-04-19T03:34:51.529Z","avatar_url":"https://github.com/swiecaJS.png","language":"JavaScript","funding_links":[],"categories":["Components and plugins"],"sub_categories":["Courses"],"readme":"# vue-a11y-click\nIt helps you handling click events on element which are not natively clickable - like `\u003cimg\u003e` or `\u003cdiv\u003e\u003c/div\u003e`. 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.\n\n\n\n## Install\n#### NPM\n```shell\nnpm install -S vue-a11y-click\n```\n\n#### Yarn\n```shell\nyarn add vue-a11y-click\n```\n\n## How to use\nIn your `main.js`\n```javascript\nimport Vue from 'vue'\nimport VueA11YClick from 'vue-a11y-click'\n\nVue.use(VueA11YClick)\n```\n\nThen you can use it in component\n```vue\n\u003ctemplate\u003e\n  \u003cdiv \n    class=\"baseCard--clickable\" \n    @click=\"handleClick\" \n    v-a11y-click\n  \u003e\n      \u003c!-- clickable content --\u003e\n  \u003c/div\u003e\n\u003c/template\u003e\n\n\u003cscript\u003e\nexport default {\n  name: 'BaseCard',\n  methods: {\n    handleClick() {\n      // ...\n    }\n  }\n  //...\n}\n\u003c/script\u003e\n```\n\n## Using with HTML files\n```html\n\u003cbody\u003e\n  \u003cdiv id=\"app\"\u003e\n\n    \u003cdiv \n      class=\"card\" \n      @click=\"triggerPopup\" \n      v-a11y-click\n    \u003e\n      \u003c!-- clickable content --\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n\n  \u003cscript src=\"https://unpkg.com/vue\"\u003e\u003c/script\u003e\n  \u003cscript src=\"https://unpkg.com/vue-skip-to\"\u003e\u003c/script\u003e\n  \u003cscript\u003e\n    Vue.use(VueSkipTo)\n    new Vue({\n      el: \"#app\",\n    })\n\n  \u003c/script\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\n## Roadmap\n\n- [] Live demo\n- [] E2E Tests\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FswiecaJS%2Fvue-a11y-click","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FswiecaJS%2Fvue-a11y-click","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FswiecaJS%2Fvue-a11y-click/lists"}