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

feat(linter/jsx-a11y): add fixer for anchor-has-content #4852

Conversation

DonIsaac
Copy link
Contributor

Add a conditional fix that removes aria-hidden from an anchor's child if there
is only a single child. This PR also fixes a false positive on hidden anchors.
It should report visible anchors with hidden content, not hidden anchors.

Copy link

graphite-app bot commented Aug 12, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

@github-actions github-actions bot added the A-linter Area - Linter label Aug 12, 2024
Copy link

codspeed-hq bot commented Aug 12, 2024

CodSpeed Performance Report

Merging #4852 will not alter performance

Comparing don/08-12-feat_linter/jsx-a11y_add_fixer_for_anchor-has-content (a6195a6) with main (a81ce3a)

Summary

✅ 29 untouched benchmarks

@DonIsaac DonIsaac force-pushed the don/08-12-feat_linter/jsx-a11y_add_fixer_for_anchor-has-content branch from a8212ab to 52d2486 Compare August 12, 2024 21:17
@DonIsaac DonIsaac requested a review from camc314 August 12, 2024 21:17
@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label Aug 13, 2024 — with Graphite App
@DonIsaac DonIsaac force-pushed the don/08-12-feat_linter/jsx-a11y_add_fixer_for_anchor-has-content branch from 52d2486 to 3758010 Compare August 13, 2024 03:30
Copy link

graphite-app bot commented Aug 13, 2024

Merge activity

Add a conditional fix that removes `aria-hidden` from an anchor's child if there
is only a single child. This PR also fixes a false positive on hidden anchors.
It should report visible anchors with hidden content, not hidden anchors.
@Boshen Boshen force-pushed the don/08-12-feat_linter/jsx-a11y_add_fixer_for_anchor-has-content branch from 3758010 to a6195a6 Compare August 13, 2024 03:31
@graphite-app graphite-app bot merged commit a6195a6 into main Aug 13, 2024
24 checks passed
@graphite-app graphite-app bot deleted the don/08-12-feat_linter/jsx-a11y_add_fixer_for_anchor-has-content branch August 13, 2024 03:35
@oxc-bot oxc-bot mentioned this pull request Aug 15, 2024
Boshen added a commit that referenced this pull request Aug 15, 2024
## [0.7.2] - 2024-08-15

### Features

- 97e38cd linter: Add fixer for unicorn/prefer-optional-catch-binding
(#4867) (heygsc)
- 93ae1c7 linter: Eslint-plugin-react jsx-props-no-spread-multi (#4866)
(keita hino)
- 0a23610 linter: Add fixer for unicorn/prefer-array-flat-map (#4844)
(heygsc)
- 13c7b1b linter/jsx-a11y: Add fixer for aria-unsupported-elements
(#4854) (DonIsaac)
- a6195a6 linter/jsx-a11y: Add fixer for anchor-has-content (#4852)
(DonIsaac)
- 4d28d03 task/website: Support render `subschemas.all_of` (#4800)
(mysteryven)

### Bug Fixes

- 21f5762 codegen: Minify large numbers (#4889) (Boshen)
- a08d7a7 linter/jsx-a11y: Reduce false negatives for html-has-lang
(#4855) (DonIsaac)
- a81ce3a linter/no-unused-vars: Do not delete function expressions when
fixing (#4848) (DonIsaac)

### Documentation

- 955a4b4 oxlint: Improve cli doc regarding fix and `-D all` (Boshen)

### Refactor

- 56f033c linter: Improve diagnostics for several jsx-a11y rules (#4853)
(DonIsaac)
- c53c210 linter/no-unused-vars: Split fixer logic into multiple files
(#4847) (DonIsaac)

Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0-merge Merge with Graphite Merge Queue A-linter Area - Linter C-enhancement Category - New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants