🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@area17/fractal-axe-a11y

Package Overview
Dependencies
Maintainers
3
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@area17/fractal-axe-a11y

A Fractal add on to test your components for accessibility issues using Axe

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
3
Created
Source

fractal-axe-a11y

This addon adds accessibility testing to your Fractal components using Axe.

Installation

To install Fractal Axe A11y to your Fractal instance use:

npm install @area17/fractal-axe-a11y

Configuration

  • Add the following lines to your fractal.config.js project configuration:
// require fractal theme
const mandelbrot = require('@frctl/mandelbrot');
const axeA11y = require('@area17/fractal-axe-a11y');

// configure theme
const theme = mandelbrot({ ... })

// Update theme config with a11y panel
axeA11y(theme);

// init theme
fractal.web.theme(theme);
  • Include preview-a11y.js in Fractal preview template:
<script src="{{ path '/axe-a11y/a11y.js' }}"></script>
  • Optionally - To test just the component and not the entire preview page, add a data attribute of data-axe-test-target to your preview template to the container of your main yield:
<main data-axe-test-target>
  {{{ yield }}}
</main>

FAQs

Package last updated on 17 Sep 2021

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