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

use shadow dom and scoped CSS to avoid styles leaking / collisions (high selector specificity hard to guarantee) #65

Open
danielweck opened this issue Jan 14, 2022 · 0 comments

Comments

@danielweck
Copy link
Member

Potential problem 1: in some cases like popup footnotes, we want some authored and reading system CSS rules to apply to the content fragment.

Potential problem 2: screen reader support, accessibility tree.

The current implementation(s) rely on ad-hoc style reset techniques, which sometimes break due to edge cases, and rare(r) authoring patterns that reveal CSS leaks/collisions.

Impacted DOM fragments: any content injected by the reading system into authored documents.

  • underscore a11y link (the only one at the top of the document, all other injected DOM is located at the end of body)
  • highlights (HTML or SVG)
  • popup footnotes (modal dialog)
  • image zoom popout (modal dialog)
  • read aloud TTS caption mode (modal dialog), as well as the collapsed invisible mode (inlined synthetic speech highlighting, but still with control overlay)
  • MathJax (out of our control, maybe uses shadow DOM already?)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant