-
Notifications
You must be signed in to change notification settings - Fork 10
Closed
Labels
Description
Problem statement
There is a gap in in-editor tooling to ensure that Link
s in text block have the inline
prop set on it for accessibility.
While we do have the in-browser axe checks to encourage setting inline
, having tooling as people are writing code is the most impactful/proactive. The in-browser axe checks are limited in coverage.
Akin to the lint rule that we've introduced in ERB, there is an opportunity to introduce an ESLint rule in Primer React that nudges setting the inline
prop for <Link>
when the link is identified as being inside of a block. This would also help prepare for the next major release when inline
becomes the default.
Important note: Static analysis is limited so this will not flag everything. However, it should help improve coverage!
Acceptance criteria
- Introduce a new lint rule that flags any links that are detected as being inside of a text block, but missing the
inline
prop.