fix: clip-path export for absolute same-document URL references#580
fix: clip-path export for absolute same-document URL references#580cedricbla wants to merge 2 commits intobubkoo:masterfrom
Conversation
|
💖 Thanks for opening this pull request! 💖 Please follow the contributing guidelines. And we use semantic commit messages to streamline the release process. Examples of commit messages with semantic prefixes:
Things that will help get your PR across the finish line:
We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #580 +/- ##
=======================================
Coverage 66.50% 66.50%
=======================================
Files 10 10
Lines 612 612
Branches 150 150
=======================================
Hits 407 407
Misses 144 144
Partials 61 61 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| @@ -0,0 +1,47 @@ | |||
| <!DOCTYPE html> | |||
| <html lang="en"> | |||
There was a problem hiding this comment.
Best Practice: Page has no mechanism to bypass repeated content. Add a <main> landmark or skip link.
Page must have a mechanism to bypass repeated blocks of content.
Details
Missing: no landmarks (<main>, <nav>, <header>, <footer>), no skip link, no headings
Keyboard users must be able to skip repetitive content like navigation. Provide a skip link at the top of the page that links to the main content (e.g., <a href="#main">Skip to main content</a>), or use a <main> landmark. Screen readers can jump directly to landmarks, so a properly marked-up <main> element satisfies this requirement.
Best Practice: Page does not contain a level-one heading.
Page should contain a level-one heading.
Details
Page title: "SVG clip-path cases"
A level-one heading (<h1> or role='heading' with aria-level='1') helps users understand the page topic and provides a landmark for screen reader navigation. Each page should have exactly one h1 that describes the main content, typically matching or similar to the page title.
Best Practice: Page has no main landmark.
Page should have exactly one main landmark.
Details
The main landmark contains the primary content of the page. Screen readers allow users to jump directly to main content. Use a single <main> element (or role='main') to wrap the central content, excluding headers, footers, and navigation.
Description
Fix clip-path rendering in exported images when source markup uses absolute same-document URL references.
This change normalizes clip-path URL values during cloning so references like
url('/context.html#clip1')are rewritten to local fragment formurl(#clip1)in the cloned tree, which survives export.Covered sources:
clip-path="url(...)"style="clip-path: url(...)"Motivation and Context
Fixes: #579
Problem:
Approach:
url(...)values during clone/decorate.url(#id).Outcome:
Types of changes
Self Check before Merge