Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: github/eslint-plugin-github
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v4.9.2
Choose a base ref
...
head repository: github/eslint-plugin-github
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v4.10.0
Choose a head ref
  • 15 commits
  • 4 files changed
  • 6 contributors

Commits on Jul 21, 2023

  1. Update a11y-no-visually-hidden-interactive-element.md

    ### What
    
    Clean up documentation `htmlPropName` was moved to the eslint settings.
    kendallgassner authored Jul 21, 2023

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    tonistiigi Tõnis Tiigi
    Copy the full SHA
    213894f View commit details
  2. clean up;

    kendallgassner committed Jul 21, 2023

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    tonistiigi Tõnis Tiigi
    Copy the full SHA
    cce449a View commit details
  3. prettier;

    kendallgassner committed Jul 21, 2023

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    tonistiigi Tõnis Tiigi
    Copy the full SHA
    6e469d2 View commit details
  4. Merge pull request #468 from github/kendallgassner-patch-1

    Update a11y-no-visually-hidden-interactive-element.md
    kendallgassner authored Jul 21, 2023

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    tonistiigi Tõnis Tiigi
    Copy the full SHA
    2a6777e View commit details

Commits on Jul 24, 2023

  1. chore(deps): bump the all-dependencies group with 3 updates

    Bumps the all-dependencies group with 3 updates: [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin), [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) and [eslint-plugin-eslint-plugin](https://github.com/eslint-community/eslint-plugin-eslint-plugin).
    
    
    Updates `@typescript-eslint/eslint-plugin` from 6.0.0 to 6.1.0
    - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
    - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
    - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.1.0/packages/eslint-plugin)
    
    Updates `@typescript-eslint/parser` from 6.0.0 to 6.1.0
    - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
    - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
    - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.1.0/packages/parser)
    
    Updates `eslint-plugin-eslint-plugin` from 5.1.0 to 5.1.1
    - [Release notes](https://github.com/eslint-community/eslint-plugin-eslint-plugin/releases)
    - [Changelog](https://github.com/eslint-community/eslint-plugin-eslint-plugin/blob/main/CHANGELOG.md)
    - [Commits](eslint-community/eslint-plugin-eslint-plugin@v5.1.0...v5.1.1)
    
    ---
    updated-dependencies:
    - dependency-name: "@typescript-eslint/eslint-plugin"
      dependency-type: direct:production
      update-type: version-update:semver-minor
      dependency-group: all-dependencies
    - dependency-name: "@typescript-eslint/parser"
      dependency-type: direct:production
      update-type: version-update:semver-minor
      dependency-group: all-dependencies
    - dependency-name: eslint-plugin-eslint-plugin
      dependency-type: direct:development
      update-type: version-update:semver-patch
      dependency-group: all-dependencies
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Jul 24, 2023

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    tonistiigi Tõnis Tiigi
    Copy the full SHA
    aac2dad View commit details
  2. Merge pull request #469 from github/dependabot/npm_and_yarn/all-depen…

    …dencies-2ba8e48a4f
    
    chore(deps): bump the all-dependencies group with 3 updates
    srt32 authored Jul 24, 2023
    Copy the full SHA
    0f1bd10 View commit details

Commits on Jul 31, 2023

  1. chore(deps): bump the all-dependencies group with 6 updates (#471)

    Bumps the all-dependencies group with 6 updates:
    
    | Package | Update |
    | --- | --- |
    | [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) | 6.1.0 to 6.2.0 |
    | [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) | 6.1.0 to 6.2.0 |
    | [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) | 8.8.0 to 8.9.0 |
    | [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) | 2.27.5 to 2.28.0 |
    | [jsx-ast-utils](https://github.com/jsx-eslint/jsx-ast-utils) | 3.3.4 to 3.3.5 |
    | [eslint](https://github.com/eslint/eslint) | 8.45.0 to 8.46.0 |
    
    
    Updates `@typescript-eslint/eslint-plugin` from 6.1.0 to 6.2.0
    - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
    - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
    - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.2.0/packages/eslint-plugin)
    
    Updates `@typescript-eslint/parser` from 6.1.0 to 6.2.0
    - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
    - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
    - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.2.0/packages/parser)
    
    Updates `eslint-config-prettier` from 8.8.0 to 8.9.0
    - [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md)
    - [Commits](prettier/eslint-config-prettier@v8.8.0...v8.9.0)
    
    Updates `eslint-plugin-import` from 2.27.5 to 2.28.0
    - [Release notes](https://github.com/import-js/eslint-plugin-import/releases)
    - [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md)
    - [Commits](import-js/eslint-plugin-import@v2.27.5...v2.28.0)
    
    Updates `jsx-ast-utils` from 3.3.4 to 3.3.5
    - [Release notes](https://github.com/jsx-eslint/jsx-ast-utils/releases)
    - [Changelog](https://github.com/jsx-eslint/jsx-ast-utils/blob/main/CHANGELOG.md)
    - [Commits](jsx-eslint/jsx-ast-utils@v3.3.4...v3.3.5)
    
    Updates `eslint` from 8.45.0 to 8.46.0
    - [Release notes](https://github.com/eslint/eslint/releases)
    - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
    - [Commits](eslint/eslint@v8.45.0...v8.46.0)
    
    ---
    updated-dependencies:
    - dependency-name: "@typescript-eslint/eslint-plugin"
      dependency-type: direct:production
      update-type: version-update:semver-minor
      dependency-group: all-dependencies
    - dependency-name: "@typescript-eslint/parser"
      dependency-type: direct:production
      update-type: version-update:semver-minor
      dependency-group: all-dependencies
    - dependency-name: eslint-config-prettier
      dependency-type: direct:production
      update-type: version-update:semver-minor
      dependency-group: all-dependencies
    - dependency-name: eslint-plugin-import
      dependency-type: direct:production
      update-type: version-update:semver-minor
      dependency-group: all-dependencies
    - dependency-name: jsx-ast-utils
      dependency-type: direct:production
      update-type: version-update:semver-patch
      dependency-group: all-dependencies
    - dependency-name: eslint
      dependency-type: direct:development
      update-type: version-update:semver-minor
      dependency-group: all-dependencies
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jul 31, 2023
    Copy the full SHA
    a7db0f5 View commit details

Commits on Aug 7, 2023

  1. chore(deps): bump the all-dependencies group with 4 updates

    Bumps the all-dependencies group with 4 updates: [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin), [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser), [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) and [prettier](https://github.com/prettier/prettier).
    
    
    Updates `@typescript-eslint/eslint-plugin` from 6.2.0 to 6.2.1
    - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
    - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
    - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.2.1/packages/eslint-plugin)
    
    Updates `@typescript-eslint/parser` from 6.2.0 to 6.2.1
    - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
    - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
    - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.2.1/packages/parser)
    
    Updates `eslint-config-prettier` from 8.9.0 to 9.0.0
    - [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md)
    - [Commits](prettier/eslint-config-prettier@v8.9.0...v9.0.0)
    
    Updates `prettier` from 3.0.0 to 3.0.1
    - [Release notes](https://github.com/prettier/prettier/releases)
    - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
    - [Commits](prettier/prettier@3.0.0...3.0.1)
    
    ---
    updated-dependencies:
    - dependency-name: "@typescript-eslint/eslint-plugin"
      dependency-type: direct:production
      update-type: version-update:semver-patch
      dependency-group: all-dependencies
    - dependency-name: "@typescript-eslint/parser"
      dependency-type: direct:production
      update-type: version-update:semver-patch
      dependency-group: all-dependencies
    - dependency-name: eslint-config-prettier
      dependency-type: direct:production
      update-type: version-update:semver-major
      dependency-group: all-dependencies
    - dependency-name: prettier
      dependency-type: direct:production
      update-type: version-update:semver-patch
      dependency-group: all-dependencies
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Aug 7, 2023
    Copy the full SHA
    0b510e4 View commit details
  2. Merge pull request #472 from github/dependabot/npm_and_yarn/all-depen…

    …dencies-d1a59f249a
    
    chore(deps): bump the all-dependencies group with 4 updates
    jfuchs authored Aug 7, 2023
    Copy the full SHA
    ed7759f View commit details

Commits on Aug 14, 2023

  1. chore(deps): bump the all-dependencies group with 3 updates

    Bumps the all-dependencies group with 3 updates: [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin), [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) and [eslint](https://github.com/eslint/eslint).
    
    
    Updates `@typescript-eslint/eslint-plugin` from 6.2.1 to 6.3.0
    - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
    - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
    - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.3.0/packages/eslint-plugin)
    
    Updates `@typescript-eslint/parser` from 6.2.1 to 6.3.0
    - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
    - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
    - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.3.0/packages/parser)
    
    Updates `eslint` from 8.46.0 to 8.47.0
    - [Release notes](https://github.com/eslint/eslint/releases)
    - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
    - [Commits](eslint/eslint@v8.46.0...v8.47.0)
    
    ---
    updated-dependencies:
    - dependency-name: "@typescript-eslint/eslint-plugin"
      dependency-type: direct:production
      update-type: version-update:semver-minor
      dependency-group: all-dependencies
    - dependency-name: "@typescript-eslint/parser"
      dependency-type: direct:production
      update-type: version-update:semver-minor
      dependency-group: all-dependencies
    - dependency-name: eslint
      dependency-type: direct:development
      update-type: version-update:semver-minor
      dependency-group: all-dependencies
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Aug 14, 2023
    Copy the full SHA
    cd64c60 View commit details
  2. Merge pull request #473 from github/dependabot/npm_and_yarn/all-depen…

    …dencies-898afcd72b
    
    chore(deps): bump the all-dependencies group with 3 updates
    srt32 authored Aug 14, 2023
    Copy the full SHA
    b662bad View commit details

Commits on Aug 21, 2023

  1. chore(deps): bump the all-dependencies group with 4 updates

    Bumps the all-dependencies group with 4 updates: [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin), [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser), [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) and [prettier](https://github.com/prettier/prettier).
    
    
    Updates `@typescript-eslint/eslint-plugin` from 6.3.0 to 6.4.0
    - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
    - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
    - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.4.0/packages/eslint-plugin)
    
    Updates `@typescript-eslint/parser` from 6.3.0 to 6.4.0
    - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
    - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
    - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.4.0/packages/parser)
    
    Updates `eslint-plugin-import` from 2.28.0 to 2.28.1
    - [Release notes](https://github.com/import-js/eslint-plugin-import/releases)
    - [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md)
    - [Commits](import-js/eslint-plugin-import@v2.28.0...v2.28.1)
    
    Updates `prettier` from 3.0.1 to 3.0.2
    - [Release notes](https://github.com/prettier/prettier/releases)
    - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
    - [Commits](prettier/prettier@3.0.1...3.0.2)
    
    ---
    updated-dependencies:
    - dependency-name: "@typescript-eslint/eslint-plugin"
      dependency-type: direct:production
      update-type: version-update:semver-minor
      dependency-group: all-dependencies
    - dependency-name: "@typescript-eslint/parser"
      dependency-type: direct:production
      update-type: version-update:semver-minor
      dependency-group: all-dependencies
    - dependency-name: eslint-plugin-import
      dependency-type: direct:production
      update-type: version-update:semver-patch
      dependency-group: all-dependencies
    - dependency-name: prettier
      dependency-type: direct:production
      update-type: version-update:semver-patch
      dependency-group: all-dependencies
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Aug 21, 2023
    Copy the full SHA
    32a95b4 View commit details
  2. Merge pull request #474 from github/dependabot/npm_and_yarn/all-depen…

    …dencies-201a1bced9
    
    chore(deps): bump the all-dependencies group with 4 updates
    manuelpuyol authored Aug 21, 2023
    Copy the full SHA
    b93f04a View commit details

Commits on Aug 28, 2023

  1. chore(deps): bump the all-dependencies group with 4 updates (#475)

    Bumps the all-dependencies group with 4 updates: [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin), [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser), [chai](https://github.com/chaijs/chai) and [eslint](https://github.com/eslint/eslint).
    
    
    Updates `@typescript-eslint/eslint-plugin` from 6.4.0 to 6.4.1
    - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
    - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
    - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.4.1/packages/eslint-plugin)
    
    Updates `@typescript-eslint/parser` from 6.4.0 to 6.4.1
    - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
    - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
    - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.4.1/packages/parser)
    
    Updates `chai` from 4.3.7 to 4.3.8
    - [Release notes](https://github.com/chaijs/chai/releases)
    - [Changelog](https://github.com/chaijs/chai/blob/4.x.x/History.md)
    - [Commits](chaijs/chai@v4.3.7...v4.3.8)
    
    Updates `eslint` from 8.47.0 to 8.48.0
    - [Release notes](https://github.com/eslint/eslint/releases)
    - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
    - [Commits](eslint/eslint@v8.47.0...v8.48.0)
    
    ---
    updated-dependencies:
    - dependency-name: "@typescript-eslint/eslint-plugin"
      dependency-type: direct:production
      update-type: version-update:semver-patch
      dependency-group: all-dependencies
    - dependency-name: "@typescript-eslint/parser"
      dependency-type: direct:production
      update-type: version-update:semver-patch
      dependency-group: all-dependencies
    - dependency-name: chai
      dependency-type: direct:development
      update-type: version-update:semver-patch
      dependency-group: all-dependencies
    - dependency-name: eslint
      dependency-type: direct:development
      update-type: version-update:semver-minor
      dependency-group: all-dependencies
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Aug 28, 2023
    Copy the full SHA
    379041a View commit details
  2. Override rule config temporarily to address false positive (#476)

    * Override config temporarily
    
    * Run prettier
    khiga8 authored Aug 28, 2023
    Copy the full SHA
    baa4a50 View commit details
Showing with 720 additions and 476 deletions.
  1. +2 −4 docs/rules/a11y-no-visually-hidden-interactive-element.md
  2. +12 −0 lib/configs/react.js
  3. +0 −1 lib/rules/a11y-no-visually-hidden-interactive-element.js
  4. +706 −471 package-lock.json
6 changes: 2 additions & 4 deletions docs/rules/a11y-no-visually-hidden-interactive-element.md
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ Note: we are not guarding against visually hidden `input` elements at this time.

### Why do we visually hide content?

Visually hiding content can be useful when you want to provide information specifically to screen reader users or other assitive technology users while keeping content hidden from sighted users.
Visually hiding content can be useful when you want to provide information specifically to screen reader users or other assistive technology users while keeping content hidden from sighted users.

Applying the following css will visually hide content while still making it accessible to screen reader users.

@@ -61,16 +61,14 @@ width: 1px;

- className - A css className that visually hides content. Defaults to `sr-only`.
- componentName - A react component name that visually hides content. Defaults to `VisuallyHidden`.
- htmlPropName - A prop name used to replace the semantic element that is rendered. Defaults to `as`.

```json
{
"a11y-no-visually-hidden-interactive-element": [
"error",
{
"className": "visually-hidden",
"componentName": "VisuallyHidden",
"htmlPropName": "as"
"componentName": "VisuallyHidden"
}
]
}
12 changes: 12 additions & 0 deletions lib/configs/react.js
Original file line number Diff line number Diff line change
@@ -30,5 +30,17 @@ module.exports = {
canvas: ['img'],
},
],
// Remove once https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/pull/950 is shipped.
'jsx-a11y/no-noninteractive-element-to-interactive-role': [
'error',
{
ul: ['listbox', 'menu', 'menubar', 'radiogroup', 'tablist', 'tree', 'treegrid'],
ol: ['listbox', 'menu', 'menubar', 'radiogroup', 'tablist', 'tree', 'treegrid'],
li: ['menuitem', 'menuitemradio', 'menuitemcheckbox', 'option', 'row', 'tab', 'treeitem'],
table: ['grid'],
td: ['gridcell'],
fieldset: ['radiogroup', 'presentation'],
},
],
},
}
1 change: 0 additions & 1 deletion lib/rules/a11y-no-visually-hidden-interactive-element.js
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@ const defaultcomponentName = 'VisuallyHidden'
const schema = generateObjSchema({
className: {type: 'string'},
componentName: {type: 'string'},
htmlPropName: {type: 'string'},
})

/** Note: we are not including input elements at this time
1,177 changes: 706 additions & 471 deletions package-lock.json

Large diffs are not rendered by default.