Skip to content

SLMNBJ/selectize-plugin-a11y

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

selectize-plugin-a11y.js

Selectize-plugin-a11y is a plugin to make Selectize.js accessible as a Combobox.

Selectize-plugin-a11y – Usage

<script type="text/javascript" src="selectize.js"></script>
<script type="text/javascript" src="selectize-plugin-a11y.js"></script>
<script>
$(function() {
    $('select').selectize({
        plugins: ['selectize-plugin-a11y'],
        render: {
            option: function($item, escape) {
                // Every option must have a unique id
                return `<div class="option" role="option" id="${$item.text.replace(' ', '')}">${$item.text}</div>`
            }
        }
    });
</script>

Pull requests are always welcome

Any pull request to improve the plugin will be appreciated 😉

About

Make Selectize.js accessibile as Combobox

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •