Styling `:focus-within` on `<details>`

Open Beginner friendly
#171 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
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
css

Research direction

Use the issue's details:has(summary:focus-within) selector as the entry point and locate the existing

and styles. Test keyboard focus on a in a browser, then confirm that the details element shows the accent border and outline while its summary is focused.

Written by the indexing model from the issue text.

Description

visual

Currently tabbing to a <details> does not show the usual :focus-within outline (technically, tabbing to the <summary>)

This could be fixed with

details:has(summary:focus-within) {
  border-color: var(--accent);
  outline: .2em solid var(--accent);
}
Dominant language
CSS
Stars
798
Forks
29
PR merge metrics
No merged PRs in 30d

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 bigskysoftware/missing

All issues in bigskysoftware/missing

Similar issues

More Accessibility issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.