Tabster crashes in Firefox
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 165
- Forks
- 42
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 9
Description
When pressing Tab in a web app that uses Tabster in Firefox, I hit a crash in the following code in Focusable.ts:
private _isHidden(el: HTMLElement): boolean {
const attrVal = el.getAttribute("aria-hidden");
if (attrVal && attrVal.toLowerCase() === "true") {
if (!this._tabster.modalizer?.isAugmented(el)) {
return true;
}
}
return false;
}
The loop in isAccessible proceeds all the up the DOM to the HTMLDocument element and el.getAttribute is not defined for the HTMLDocument element so it crashes on the first line of _isHidden. Seems like the code should check if el.getAttribute is defined before trying to call it.
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
Start in Focusable.ts at _isHidden and reproduce the crash by pressing Tab in a Firefox web app using Tabster. Trace isAccessible as it reaches the HTMLDocument element, then verify that the same navigation no longer crashes and that normal aria-hidden handling still works.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- accessibility, frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100