Vue 3 plugin designed to enhance accessibility by removing the tab index from Leaflet map elements
MIT License
npm install leaflet-tab-remover
Leaflet Tab Remover is a Vue 3 plugin designed to enhance accessibility by removing the tab index from Leaflet map elements. This plugin is particularly useful when you want to integrate keyboard navigation (tab-based navigation) in your application, but don't want the Leaflet map elements to be part of the tab order.
tabindex
from Leaflet map elements (.leaflet-interactive
and .leaflet-container
).To use the plugin, first register it in your Vue application:
import { createApp } from 'vue';
import App from './App.vue';
import leafletTabRemover from 'leaflet-tab-remover';
const app = createApp(App);
app.use(leafletTabRemover);
app.mount('#app');
<template>
<div>
<div id="map" class="leaflet-container"></div>
<!-- Your Leaflet map component -->
</div>
</template>
<script>
export default {
mounted() {
// Initialize your Leaflet map here
// Remove tabindex from Leaflet map elements
this.$removeLeafletTabIndex();
}
}
</script>
If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are warmly welcome.
npm install leaflet-tab-remover
Leaflet Tab Remover - Vue 3, , (tab index) Leaflet. , () , , Leaflet .
tabindex
Leaflet (.leaflet-interactive
.leaflet-container
). .
Vue 3.
, Vue :
import { createApp } from 'vue';
import App from './App.vue';
import leafletTabRemover from 'leaflet-tab-remover';
const app = createApp(App);
app.use(leafletTabRemover);
app.mount('#app');
<template>
<div>
<div id="map" class="leaflet-container"></div>
<!-- Leaflet -->
</div>
</template>
<script>
export default {
mounted() {
// Leaflet
// tabindex Leaflet
this.$removeLeafletTabIndex();
}
}
</script>
, feature. - !
MIT License
Copyright (c) 2024 Andrew Kras
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.