Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend jsx-a11y to also look for Next.js Images #257

Merged
merged 2 commits into from
Mar 13, 2024

Conversation

RubenSandwich
Copy link
Contributor

@RubenSandwich RubenSandwich commented Mar 13, 2024

Description

This PR extends the jsx-a11y/alt-text rule to also look for Next.js Images.

PR Checklist 🚀

  • Conduct thorough self-review.
  • Add or update tests as appropriate.
  • Write a useful description (above) to give reviewers appropriate context.
  • Identify (in the description above) and document (add Asana tasks on this board) any technical debt that you're aware of, but are not addressing as part of this PR.

Copy link

changeset-bot bot commented Mar 13, 2024

🦋 Changeset detected

Latest commit: 0308a62

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@hashicorp/platform-cli Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@@ -69,6 +69,14 @@ module.exports = {
],

rules: {
// Extend jsx-a11y/alt-text to also look for Next.js Images
"jsx-a11y/alt-text": [2, {
"elements": ["img", "object", "area", "input[type=\"image\"]"],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documentation wasn't clear if adding new elements could/would erase the current ones, so I added the defaults.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good call to be safe 👍

@RubenSandwich RubenSandwich self-assigned this Mar 13, 2024
@RubenSandwich RubenSandwich requested review from a team and EnMod and removed request for a team March 13, 2024 18:48
Copy link
Contributor

@EnMod EnMod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -69,6 +69,14 @@ module.exports = {
],

rules: {
// Extend jsx-a11y/alt-text to also look for Next.js Images
"jsx-a11y/alt-text": [2, {
"elements": ["img", "object", "area", "input[type=\"image\"]"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good call to be safe 👍

@RubenSandwich RubenSandwich merged commit 10c190c into main Mar 13, 2024
3 checks passed
@RubenSandwich RubenSandwich deleted the rn/fix/jsx-a11y-look-for-next-images branch March 13, 2024 19:22
@hashibot-web hashibot-web mentioned this pull request Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants