More robust `focusQuerySelector` for popup focus
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
In:
https://github.com/mapbox/mapbox-gl-js/blob/45dd9cb02930f639330a48c06806c55bde8e3259/src/ui/popup.js#L38-L46
- I believe you'd rather want :not(:disabled) over `:not([disabled])`, because the latter does not select these elements if they're disabled via a parent, e.g. ``.
- Also, `video[controls]` is focusable, at least in Chrome.
In https://github.com/WICG/inert/blob/09c0647f59a3ad61ffbd92d17b9a0770fdbef412/src/inert.js#L24-L35 the following is also present:
- `area[href]`
- `details` (not sure why this is included, I think `summary` is the focusable element in all browsers?)
- `summary`
- `iframe`
- `embed`
- `object`
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Inspect src/ui/popup.js at the focusQuerySelector lines and compare its selector with the focusable-element cases listed in the issue and WICG inert.js. Done means popup focus handling accounts for disabled descendants and the additional elements identified in the report.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- accessibility, frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100