PHPackages                             nielsdeblaauw/twigcs-a11y - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. nielsdeblaauw/twigcs-a11y

ActiveLibrary[Templating &amp; Views](/categories/templating)

nielsdeblaauw/twigcs-a11y
=========================

Accessibility rules for TwigCS

0.3.0(4y ago)885.9k↑1280%3[1 issues](https://github.com/NielsdeBlaauw/twigcs-a11y/issues)MITPHP

Since Oct 8Pushed 4y ago1 watchersCompare

[ Source](https://github.com/NielsdeBlaauw/twigcs-a11y)[ Packagist](https://packagist.org/packages/nielsdeblaauw/twigcs-a11y)[ RSS](/packages/nielsdeblaauw-twigcs-a11y/feed)WikiDiscussions main Synced yesterday

READMEChangelog (4)Dependencies (3)Versions (5)Used By (0)

twigcs-a11y
===========

[](#twigcs-a11y)

This is a [TwigCS](https://github.com/friendsoftwig/twigcs) accessibility ruleset. It statically checks twig templates for known accessibility issues.

The ruleset is inspired by [Deque's Axe Linter](https://axe-linter.deque.com/)

**Note:** *Automated tests do not guarantee your site is accessible. Manual testing is the only way to make sure.*

Want to learn more about creating accessible websites? Check out [The A11Y Collective](https://a11y-collective.com/).

Installation
------------

[](#installation)

`composer require --dev nielsdeblaauw/twigcs-a11y`

Use
---

[](#use)

`vendor/bin/twigcs --ruleset \\NdB\\TwigCSA11Y\\Ruleset`

**Example Output**

```
./tests/test.twig
l.2 c.0 : ERROR [A11Y.TabIndex] Invalid 'tabindex'. Tabindex must be 0 or -1. Found `tabindex=1>.`
l.12 c.20 : ERROR [A11Y.TabIndex] Invalid 'tabindex'. Tabindex must be 0 or -1. Found `tabindex=test.`
l.12 c.53 : ERROR [A11Y.TabIndex] Invalid 'tabindex'. Tabindex must be 0 or -1. Found `tabindex='test'.`
l.16 c.0 : ERROR [A11Y.BannedHTMLTags] Tag 'marquee' is dissallowed. Found ``.
l.18 c.0 : ERROR [A11Y.BannedHTMLTags] Tag 'blink' is dissallowed. Found ``.
5 violation(s) found

```

For additional options read the [TwigCS documentation](https://github.com/friendsoftwig/twigcs).

Rules
-----

[](#rules)

The following rules are implemented as part of this ruleset.

### TabIndex

[](#tabindex)

**[Axe Tabindex rule description.](https://dequeuniversity.com/rules/axe/3.5/tabindex)**

Using a non `0` or `-1` value for tabindex results in unexpected behaviour for keyboard users. Variables in the tabindex property of an element are considered invalid.

### BannedHTMLTags

[](#bannedhtmltags)

**[Axe Blink rule description.](https://dequeuniversity.com/rules/axe/3.5/blink)**

**[Axe Marquee rule description.](https://dequeuniversity.com/rules/axe/3.5/marquee)**

The `blink` and `marquee` tags are disallowed from use. These elements can cause issues for users with cognitive disabilities.

### AriaRoles

[](#ariaroles)

**[Axe aria-roles rule description.](https://dequeuniversity.com/rules/axe/3.5/aria-roles)**

Catches invalid Aria role values. Typo's, non-standard and dynamic roles are not allowed.

Invalid roles can not be correctly interpreted by assistive technology.

Roadmap
-------

[](#roadmap)

The idea is to implement as many rules as possible from the [Axe Linter](https://axe-linter.deque.com/docs/ruleset/) ruleset.

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity37

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 54.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~165 days

Total

4

Last Release

1596d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/661876?v=4)[Niels de Blaauw](/maintainers/NielsdeBlaauw)[@NielsdeBlaauw](https://github.com/NielsdeBlaauw)

---

Top Contributors

[![NielsdeBlaauw](https://avatars.githubusercontent.com/u/661876?v=4)](https://github.com/NielsdeBlaauw "NielsdeBlaauw (13 commits)")[![MPParsley](https://avatars.githubusercontent.com/u/1823998?v=4)](https://github.com/MPParsley "MPParsley (11 commits)")

---

Tags

accessibilitycontinuous-integrationstatic-analysistwigtwigcs

###  Code Quality

Static AnalysisPsalm

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/nielsdeblaauw-twigcs-a11y/health.svg)

```
[![Health](https://phpackages.com/badges/nielsdeblaauw-twigcs-a11y/health.svg)](https://phpackages.com/packages/nielsdeblaauw-twigcs-a11y)
```

###  Alternatives

[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3851.2M](/packages/limenius-react-bundle)[area17/laravel-auto-head-tags

Laravel Auto Head Tags helps you build the list of head elements for your app

4616.1k](/packages/area17-laravel-auto-head-tags)[jelix/wikirenderer

WikiRenderer is a library to generate HTML or anything else from wiki content.

1712.3k1](/packages/jelix-wikirenderer)[webkinder/sproutset

A Composer package for handling responsive images in Roots Bedrock + Sage + Blade projects.

282.2k](/packages/webkinder-sproutset)[muratbsts/mail-template

This package is a easy to use mail template collection for Laravel 5.x.

191.3k](/packages/muratbsts-mail-template)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
