🎨 Palette: Add accessible 'Copy' utility to code blocks#27
🎨 Palette: Add accessible 'Copy' utility to code blocks#27rtech-technologies wants to merge 1 commit into
Conversation
- Added a 'Copy' button to code blocks in os2.html with a terminal aesthetic.
- Implemented robust copy-to-clipboard functionality with a legacy fallback.
- Added immediate visual and accessible feedback ('COPIED!' text and ARIA label updates).
- Ensured keyboard accessibility with focus states.
- Refined implementation to avoid hardcoded IDs and support reusability.
Co-authored-by: rtech-technologies <254326487+rtech-technologies@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
This PR adds a delightful and accessible 'Copy' utility to the code snippets on the OS*2 specification page.
💡 What:
A new 'Copy' button that appears on hover/focus of code blocks. It extracts the assembly logic and copies it to the user's clipboard.
🎯 Why:
Users often want to copy configuration or assembly snippets for their own industrial nodes. Providing a dedicated button is more intuitive than manual selection.
♿ Accessibility:
aria-label('Copy code snippet').aria-labelupdates during the 'COPIED!' state.📸 Before/After:
[Screenshot and Video attached in verification step]
PR created automatically by Jules for task 257662611558051000 started by @rtech-technologies