-
-
Notifications
You must be signed in to change notification settings - Fork 534
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
Fix Safari VoiceOver issue #2633
base: main
Are you sure you want to change the base?
Fix Safari VoiceOver issue #2633
Conversation
✅ Deploy Preview for astro-starlight ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
I tested the current Starlight docs home page on MacOS 14.6 and found similar results: VO + Safari 17.6 reads the script tag contents (unexpected) |
Thanks for catching this @HiDeoo! Linking a WebKit bug I just reported based on this: https://bugs.webkit.org/show_bug.cgi?id=283645 Given the bug is CSS related I'm curious whether setting I shared this issue on Mastodon and got various responses including some recommending avoiding |
🦋 Changeset detectedLatest commit: 8400bdf The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix! I also tested on Safari 18.1 on macOS 15.1 and confirmed both that the bug exists and that this PR fixes it.
Description
The change may look a bit weird at first but it looks like the number of Safari/VoiceOver issue with
display: contents;
is growing. A new "fun" one I just discovered seems to be related to a web component havingdisplay: contents;
and a<script>
element as a direct child which seems to make VoiceOver read the content of the<script>
element.This reproduces at least on macOS Sequoia 15.1 with Safari 18.1.
Here is a video before the fix…
before.mp4
Here is a video after the fix:
after.mp4
If this is accepted, maybe we could add a comment in the file frontmatter explaining why we have this attribute on a
script
element with a link to this PR and the videos?