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

[Docs] Update error message for no-static-element-interactions rule #843

Conversation

uncommon-type
Copy link
Contributor

@uncommon-type uncommon-type commented Mar 16, 2022

Description

This PR updates an error message for no-static-element-interactions rule. It recommends using native HTML whenever possible. If for some reason it is not, this PR suggests adding an appropriate role along with support for mouse, keyboard, and touch inputs to all interactive non-semantic elements.

Related Issue

Closes #761

Acceptance Criteria

  • Recommend using native HTML whenever possible
  • Recommend adding to all interactive non-semantic elements an appropriate role as well as support for mouse, keyboard and touch input

Type of Changes

Type
🐛 Bug fix
✨ New feature
🔨 Refactoring
💯 Add tests
🔗 Update dependencies
📜 Docs

- Recommend using native HTML whenever possible
- If using native counterpart is impossible, recommend adding to all
interactive non-semantic elements an appropriate role along with
support for mouse, keyboard and touch inputs.

Fixes jsx-eslint#761
@codecov
Copy link

codecov bot commented Mar 16, 2022

Codecov Report

Merging #843 (0d6a96c) into main (5e966e5) will not change coverage.
The diff coverage is 100.00%.

❗ Current head 0d6a96c differs from pull request most recent head 0f1615a. Consider uploading reports for the commit 0f1615a to get more accurate results

@@           Coverage Diff           @@
##             main     #843   +/-   ##
=======================================
  Coverage   99.22%   99.22%           
=======================================
  Files          98       98           
  Lines        1419     1419           
  Branches      479      479           
=======================================
  Hits         1408     1408           
  Misses         11       11           
Impacted Files Coverage Δ
src/rules/no-static-element-interactions.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5e966e5...0f1615a. Read the comment docs.

@uncommon-type uncommon-type force-pushed the modify-no-static-element-interactions-rule-error branch from 0d6a96c to 16d5953 Compare March 16, 2022 11:10
@uncommon-type uncommon-type marked this pull request as ready for review March 16, 2022 11:13
@uncommon-type uncommon-type force-pushed the modify-no-static-element-interactions-rule-error branch from 16d5953 to f9a766e Compare March 16, 2022 11:25
Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

Seems great!

__tests__/src/rules/no-static-element-interactions-test.js Outdated Show resolved Hide resolved
src/rules/no-static-element-interactions.js Outdated Show resolved Hide resolved
@ljharb ljharb force-pushed the modify-no-static-element-interactions-rule-error branch 2 times, most recently from e25d3dd to 0f1615a Compare March 16, 2022 20:29
@ljharb ljharb merged commit 0f1615a into jsx-eslint:main Mar 16, 2022
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.

no-static-element-interactions message suggests adding a role, but not changing the element.
2 participants