FIX: Remove xlink:href to favour href due to deprecation (#14854)

Based on docs here https://developer.mozilla.org/en-US/docs/Web/SVG/Element/use#attributes,
the xlink:href attribute is deprecated and we should probably move away from it soon.
This commit is contained in:
Natalie Tay 2021-11-09 17:49:37 +08:00 committed by GitHub
parent d549022afb
commit 911f9b180a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -73,7 +73,7 @@ function buildImageAltTextButton(altText) {
<span class="alt-text" aria-label="${I18n.t(
"composer.image_alt_text.aria_label"
)}">${altText}</span>
<span class="alt-text-edit-btn"><svg aria-hidden="true" class="fa d-icon d-icon-pencil svg-icon svg-string"><use xlink:href="#pencil-alt"></use></svg></span>
<span class="alt-text-edit-btn"><svg aria-hidden="true" class="fa d-icon d-icon-pencil svg-icon svg-string"><use href="#pencil-alt"></use></svg></span>
<input class="alt-text-input" hidden="true" type="text" value="${altText}" />
</span>
`;
@ -132,7 +132,7 @@ export function setup(helper) {
"span.alt-text-readonly-container.alt-text",
"span.alt-text-readonly-container.alt-text-edit-btn",
"svg[class=fa d-icon d-icon-pencil svg-icon svg-string]",
"use[xlink:href=#pencil-alt]",
"use[href=#pencil-alt]",
"input[type=text]",
"input[hidden=true]",
"input[class=alt-text-input]",