microsoft / microsoft/TypeScript

Support HTMLElement.focus() Option FocusVisible

Open Beginner friendly
#63,626 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Fixed
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

🔍 Search Terms

focusVisible

✅ Viability Checklist
⭐ Suggestion

Typescript should now support the FocusVisible property of FocusOptions.

📃 Motivating Example

The FocusVisible FocusOption is now supported on all major browsers except Samsung Internet. It is supported on all desktop browsers. It was stated under the previous issue on the topic that a new issue should be opened when the feature is more widely supported, and it is now more widely supported.
Image
Source: HTMLElement: focus() method

💻 Use Cases
  1. What do you want to use this for? Ensuring the focused element is visibly focused.
  2. What shortcomings exist with current approaches? There isn't a workaround for this.
  3. What workarounds are you using in the meantime? There isn't a workaround for this.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the HTMLElement.focus() and FocusOptions declarations in TypeScript's DOM typings. Check how the existing focus options are represented, then add the FocusVisible property to the appropriate declaration. Done means TypeScript accepts FocusVisible when calling HTMLElement.focus().

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.