Skip to content

Linter: group a11y-related rules#1462

Closed
markokajzer wants to merge 1 commit intomarcoroth:mainfrom
markokajzer:marko/move-accessibility-rules-to-a11y-namespace
Closed

Linter: group a11y-related rules#1462
markokajzer wants to merge 1 commit intomarcoroth:mainfrom
markokajzer:marko/move-accessibility-rules-to-a11y-namespace

Conversation

@markokajzer
Copy link
Contributor

@markokajzer markokajzer commented Mar 22, 2026

closes #1310

Group a11y-related rules together and change their prefix from html-* to a11y-*

I was looking at adding more a11y linter rules, so decided to do this cleanup first, so that they're all grouped together.

There might be some additional things that we need to do, as existing config might not work anymore for these rules. technically this is somewhat of a breaking change. what would be the preferred migration strategy?

  • codemod for existing configs
  • reading previous config keys (e.g. html-input-require-autocomplete)
  • skip?
  • ...?

somewhat related question: i noticed that most of these only operate on html. however, with the introduction of #1350, their scope could be widened to include ERB tags as well.

is that something we would want to look into before introducing new rules? is that something we would want to pay attention to when introducing more a11y rules, like in #177?

@markokajzer markokajzer force-pushed the marko/move-accessibility-rules-to-a11y-namespace branch 3 times, most recently from 5527d4a to 1765df4 Compare March 22, 2026 16:49
@markokajzer markokajzer force-pushed the marko/move-accessibility-rules-to-a11y-namespace branch from 1765df4 to 5da76fc Compare March 22, 2026 17:01
@marcoroth
Copy link
Owner

Thanks @markokajzer!

I think I want to wait with this a little bit before we do a big rename of the linter rule names.

But I think for the migration story, we want to utilize the --upgrade command we introduced in #1453:

CleanShot 2026-03-22 at 23 07 27@2x

So that running herb-lint --upgrade will go through all files, renames any <%# herb:disable %> comments, and updates the .herb.yml from the old to the new rule names.

@marcoroth marcoroth marked this pull request as draft March 22, 2026 22:11
@markokajzer
Copy link
Contributor Author

i'm happy to close this for now then 👍

i'll start adding new related rules under ally-* already, like ally-no-autofocus-attribute in #177 👍

if you want to look into handling of erb for some of these already existing ally rules, feel free to create a separate issue, and i can get going on that as well.

thank you mate! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Linter: Consider renaming all accessibility-related rule names to a11y-*

2 participants