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

📎 Implement useFocusableInteractive - jsx-a11y/interactive-supports-focus #2611

Closed
Conaclos opened this issue Apr 26, 2024 · 4 comments · Fixed by #2710
Closed

📎 Implement useFocusableInteractive - jsx-a11y/interactive-supports-focus #2611

Conaclos opened this issue Apr 26, 2024 · 4 comments · Fixed by #2710
Assignees
Labels
A-Linter Area: linter L-JavaScript Language: JavaScript and super languages S-Help-wanted Status: you're familiar with the code base and want to help the project

Comments

@Conaclos
Copy link
Member

Conaclos commented Apr 26, 2024

Description

Implement interactive-supports-focus.

Want to contribute? Lets you know you are interested! We will assign you to the issue to prevent several people to work on the same issue. Don't worry, we can unassign you later if you are no longer interested in the issue! Read our contributing guide and analyzer contributing guide.

Suggested name: useFocusableInteractive

@Conaclos Conaclos added A-Linter Area: linter L-JavaScript Language: JavaScript and super languages S-Help-wanted Status: you're familiar with the code base and want to help the project labels Apr 26, 2024
@fujiyamaorange
Copy link
Contributor

@Conaclos
The eslint link looks same as #2610 👀

@DerTimonius
Copy link
Contributor

I'd like to work on this one 🙂

@DerTimonius
Copy link
Contributor

Currently working on this, I'm already making good progress!

There are two questions that came up:

  1. Should the third case of the original rule be included here? To me, it feels a bit disconnected

Case: This element is not a button, link, menuitem, etc. It is catching bubbled events from elements that it contains
If your element is catching bubbled click or key events from descendant elements, then the proper role for this element is presentation.

<div
  onClick={onClickHandler}
  role="presentation">
  <button>Save</button>
</div> 

Marking an element with the role presentation indicates to assistive technology that this element should be ignored; it exists to support the web application and is not meant for humans to interact with directly.

  1. Should the rule have options to make some elements not only focusable, but also tabbable as suggested in the original rule?

@ematipico
Copy link
Member

  1. Yeah you're right, the third case is weird. In that case, we should suggest a different role (covered by another rule I think). We should ignore it.
  2. Usually we start without options unless they are needed for the first round of implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Linter Area: linter L-JavaScript Language: JavaScript and super languages S-Help-wanted Status: you're familiar with the code base and want to help the project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants