Support HTMLElement.focus() Option FocusVisible

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

Nobody has claimed this yet.

Assessment

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

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.

Description

Fixed
🔍 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.
Dominant language
Go
Stars
111k
Forks
14.4k
Avg merge
1d 15h
Merged PRs (30d)
106

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.

More from microsoft/TypeScript

All issues in microsoft/TypeScript

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.