Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Focus-visible styles on iframe when tabbing #45

Open
JayPanoz opened this issue Dec 14, 2024 · 3 comments
Open

Focus-visible styles on iframe when tabbing #45

JayPanoz opened this issue Dec 14, 2024 · 3 comments

Comments

@JayPanoz
Copy link
Contributor

We don’t currently have any :focus-visible styling when the iframe is tabbed, unlike every other interactive element of the UI. So unless there’s a link in the resource displayed in the iframe for instance, there is no visual indication that you’ve just tabbed into the contents.

However, this is trickier that it may seem at first sight, given the iframe is the document.activeElement, but doesn’t receive :focus nor :focus-visible – unless I’m missing something, it’s the content within that does.

@JayPanoz JayPanoz self-assigned this Dec 14, 2024
@JayPanoz JayPanoz changed the title Focus on iframe when tabbing Focus-visible styles on iframe when tabbing Dec 14, 2024
@HadrienGardeur HadrienGardeur moved this from Draft to Icebox in Readium Playground Dec 15, 2024
@HadrienGardeur
Copy link
Member

I've noticed that on Thorium, we can lose the current position when tabbing back into the content (I'm redirected to the beginning of the chapter). Is this something you ever looked into @danielweck?

@danielweck
Copy link
Member

See #49 (comment)
Thank you :)

@danielweck
Copy link
Member

@HadrienGardeur to be clear: keyboard-tabbing into an EPUB HTML document only "works" (only useful) if the DOM contains tabbable/focussable elements, such as hyperlinks or buttons (otherwise, the focus moves to whatever follows the iframe, skipping the content entirely). The user story is completely different for screen reader users, who benefit from fine-grain linear and hierarchical navigation (tab navigation is very coarse, by comparison).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Icebox
Development

No branches or pull requests

3 participants