Skip to content

Commit

Permalink
fix: accessibility metadata link rel instead of property attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
danielweck committed May 8, 2020
1 parent 0090111 commit 188c8b8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/renderer/components/MetaDataEditorModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,10 +311,9 @@ class MetaDataEditorModal extends React.Component {
});

this.packageOpfXPathSelect('/opf:package/opf:metadata/opf:link[not(@refines)]', this.packageOpfXmlDoc).forEach((link) => {
const prop = link.getAttribute('property');
const rel = link.getAttribute('rel');
const href = link.getAttribute('href');
let name = prop || rel;
let name = rel;
if (name) {
name = name.trim();
}
Expand Down Expand Up @@ -478,7 +477,7 @@ class MetaDataEditorModal extends React.Component {
'http://www.idpf.org/2007/opf',
useLink ? "link" : "meta");
if (useLink) {
childElement.setAttribute("property", md.name);
childElement.setAttribute("rel", md.name);
childElement.setAttribute("href", md.content);
} else if (this.isEPUB3) {
childElement.setAttribute("property", md.name);
Expand Down

0 comments on commit 188c8b8

Please sign in to comment.