Conversation
|
Claude finished @nicobytes's task in 7m 11s —— View job PR Review
Issues Found1. TipTap In rel: {
default: null, // was 'noopener noreferrer' in TipTap's default
parseHTML: (el) => el.getAttribute('rel'),
renderHTML: (attrs) => (attrs.rel ? { rel: attrs.rel } : {})
}TipTap's Link extension ships with Fix: preserve TipTap's default ( 2. Image node silently drops new attributes in In if (isImageNode) {
this.editor().chain().focus().setImageLink({ href: linkToSave, target }).run();
}
3.
4. Advanced attributes unreachable when creating a new link The Advanced section is inside 5. VTL nested double quotes in #if($mark.attrs.get("aria-label"))aria-label"))}"#endThe inner Minor / Spec
|
There was a problem hiding this comment.
Pull request overview
This PR enhances dotCMS’s block editor link editing and rendering by adding support for additional HTML/accessibility attributes (title, aria-label, rel) and exposing them in the link editor popover UI, with accompanying unit tests.
Changes:
- Extend TipTap
Linkmark configuration to parse/rendertitle,aria-label, andrel. - Update link editor popover UI/logic to edit
target,title,aria-label, andrel, including an “Advanced” section. - Persist/render the new attributes in server-side Velocity rendering and the Angular SDK renderer; add unit tests for the new behavior.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| dotCMS/src/main/webapp/WEB-INF/velocity/VM_global_library.vm | Adds title/aria-label/rel attributes to server-side rendered anchor tags. |
| core-web/libs/sdk/angular/src/lib/components/dotcms-block-editor-renderer/blocks/text.component.ts | Adds attribute bindings so rendered links include title/aria-label/rel. |
| core-web/libs/block-editor/src/lib/elements/dot-bubble-menu/components/dot-link-editor-popover/dot-link-editor-popover.component.ts | Adds signals/options and applies extended link attributes via setLink. |
| core-web/libs/block-editor/src/lib/elements/dot-bubble-menu/components/dot-link-editor-popover/dot-link-editor-popover.component.html | Reworks the popover UI to use selects and an Advanced section for extra attributes. |
| core-web/libs/block-editor/src/lib/elements/dot-bubble-menu/components/dot-link-editor-popover/dot-link-editor-popover.component.css | Updates styles to match the new layout/controls. |
| core-web/libs/block-editor/src/lib/elements/dot-bubble-menu/components/dot-link-editor-popover/dot-link-editor-popover.component.spec.ts | Adds unit tests covering initialization, persistence, and advanced-section behavior. |
| core-web/libs/block-editor/src/lib/components/dot-block-editor/dot-block-editor.component.ts | Extends TipTap Link mark to persist title/aria-label/rel in JSON/DOM. |
|
Rollback safety analysis complete. All 7 changed files are frontend-only, additive changes. No unsafe categories matched. Label AI: Safe To Rollback has been applied. |
…prove link handling
…s' of github.com:dotCMS/core into 35234-add-accessibility-attributes-to-block-editor-links
This pull request enhances the link editing experience in the block editor by adding support for accessibility and advanced HTML attributes on links. It introduces new UI controls for editing link
title,aria-label, andrelattributes, updates the TipTap Link extension to persist these attributes, and adds comprehensive tests for the new functionality. The UI has been reorganized to provide a more accessible and user-friendly workflow for editing all link properties.Accessibility & Advanced Link Attribute Support:
Linkextension indot-block-editor.component.tsis extended to supporttitle,aria-label, andrelattributes, ensuring these are persisted in the editor's JSON and DOM output.DotLinkEditorPopoverComponentnow provides UI fields and logic for editingtitle,aria-label, andrel, including an "Advanced" section that auto-expands when these attributes are present. [1] [2] [3] [4]targetandrelattributes are now clearly defined and selectable from dropdowns, replacing the previous checkbox for "Open in new window". [1] [2]UI/UX Improvements:
Testing Enhancements:
Codebase Maintenance:
Checkbox), and introduces clear documentation for new interfaces and constants. [1] [2]These changes collectively improve accessibility, flexibility, and reliability when working with links in the block editor.
This PR fixes: #35234
This PR fixes: #35234