Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
accessible-menu
Advanced tools
A JavaScript library to help you generate WAI-ARIA accessible menus in the DOM.
A JavaScript library to help you generate WAI-ARIA accessible menus in the DOM.
NPM is recommended for large-scale development, since it works well with bundlers like Webpack or Rollup.
# latest stable
npm install accessible-menu
For learning/prototyping purposes you can use the latest version with:
<script src="https://cdn.jsdelivr.net/npm/accessible-menu/dist/accessibleMenu.js"></script>
For production environments, it is recommend to use a specific version to avoid unforseen breaking changes:
<script src="https://cdn.jsdelivr.net/npm/accessible-menu@1.0.0-beta.1/dist/accessibleMenu.js"></script>
To use accessible-menu, you first need to ensure your menu follows a basic menu structure.
<menu>
<menu-item><a>...</a></menu-item>
<menu-item-with-dropdown>
<dropdown-toggle />
<dropdown-menu>
<menu-item><a>...</a></menu-item>
...
</dropdown-menu>
</menu-item-with-dropdown>
<menu-item><a>...</a></menu-item>
...
</menu>
include the root menu or bundled library in your project:
import AccessibleMenu from 'accessible-menu';
or
<script src="path/to/accessible-menu/dist/accessibleMenu.js"></script>
Once you have accessible-menu loaded, simply declare a new menu object and initialize it.
const menu = new AccessibleMenu(
menuDOMObject,
"menu-item-css-selector",
"menu-item-with-dropdown-css-selector",
"dropdown-toggle-css-selector",
"dropdown-menu-css-selector",
"class-to-open-menus"
);
menu.initialize();
Want more detailed usage information? It's on the way! Check back for a later release which will include much more documentation.
This project uses Semantic Versioning 2.0.0 to keep track of releases.
For more detailed information about SemVer, please see the official documentation.
Run npm install
.
This will ensure you have all the dependencies needed to properly lint your code and commits.
This project uses the conventional commit standard, which means your commits should follow a basic template of:
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
For more detailed information about available types, scopes, breaking changes, etc. please see the official documentation.
This project also provides a command to assist you in formatting commit messages using commitizen:
npm run commit
This project follows a set of coding standards combining StandardJS, Prettier, and JSDoc.
To check your code, you can use ESLint with the provided script:
npm run lint
You can also fix some violations automatically using:
npm run fix
FAQs
A JavaScript library to help you generate WCAG accessible menus in the DOM.
The npm package accessible-menu receives a total of 676 weekly downloads. As such, accessible-menu popularity was classified as not popular.
We found that accessible-menu demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.