Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@github/axe-github

Package Overview
Dependencies
Maintainers
0
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@github/axe-github

Custom rules and configuration recommendations for the `axe-core` library for GitHub projects

  • 0.7.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
28K
increased by5.01%
Maintainers
0
Weekly downloads
 
Created
Source

axe-github

Custom rules and configuration recommendations for the axe-core library for GitHub projects.

Custom rules

These are the custom rules contained in this package:

  • aria-attribute-is-valid
  • autofocus-in-dialog
  • avoid-both-disabled-and-aria-disabled
  • empty-summary
  • menuitem-should-be-interactive
  • nested-forms
  • redundant-aria-label-aria-labelledby
  • submit-reset-button-must-be-in-form

Configuration

We recommend running axe-core defaults.

Basic usage

import axe from 'axe-core'
import customRules from '@github/axe-github'

axe.configure(customRules)
axe.run(...)

Playwright configuration

For the custom rules in this library, their associated check functions are not serializable to a Playwright page. To configure axe, you'll need to load and evaluate configure-browser.ts within the page context. Axe should be loaded on the page before configuring.

const configSrc = fs.readFileSync(
  require.resolve('@github/axe-github/configure-browser'),
  'utf8'
)

page.evaluate((configSrc) => {
  window.eval(configSrc)
}, configSrc)

FAQs

Package last updated on 29 Jul 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc