Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect usage of the rel attribute #188

Closed
fkohrt opened this issue Oct 16, 2020 · 1 comment · Fixed by #191
Closed

Incorrect usage of the rel attribute #188

fkohrt opened this issue Oct 16, 2020 · 1 comment · Fixed by #191
Assignees
Labels
💻 aspect: code Concerns the software code in the repository 🛠 goal: fix Bug fix 🟧 priority: high Stalls work on the project or its dependents

Comments

@fkohrt
Copy link
Contributor

fkohrt commented Oct 16, 2020

Description

To the best of my RDFa knowledge, the object of the rel attribute is the href attribute and not the inner content of its tag (sources: 1, 2). The latter is, however, implied by the following code fragments:

dataForHtmlGeneration.workTitle = `<span rel="dct:title">${workTitle}</span>`

return `<span rel="cc:attributionName">${this.creatorName}</span>`

<template v-slot:workTitle>
<a
v-if="workUrl && isWeb"
:href="workUrl"
rel="cc:attributionURL"
>
<span v-if="!workTitle">{{ $t('license-use.richtext.workTitle') }}</span>
<span
v-else
rel="dct:title"
>
{{ workTitle }}
</span>
</a>
<span
v-else-if="workTitle"
rel="dct:title"
>
{{ workTitle }}
</span>
<span v-else>{{ $t('license-use.richtext.workTitle') }}</span>
</template>

expect(wrapper.vm.creatorSpan).toBe('<span rel="cc:attributionName">J Doe</span>')

(And several times inside tests/unit/specs/utils/license-uilities.test.js.)

Expectation

The property attribute should be used instead.

@fkohrt fkohrt added 💻 aspect: code Concerns the software code in the repository 🚦 status: awaiting triage Has not been triaged & therefore, not ready for work 🛠 goal: fix Bug fix 🟧 priority: high Stalls work on the project or its dependents labels Oct 16, 2020
@obulat
Copy link
Contributor

obulat commented Oct 21, 2020

Thank you for bringing this up, @fkohrt ! It is great to have input on RDFa properties. I will review your PR tomorrow.

@obulat obulat added 💻 aspect: code Concerns the software code in the repository 🛠 goal: fix Bug fix 🟧 priority: high Stalls work on the project or its dependents and removed 💻 aspect: code Concerns the software code in the repository 🚦 status: awaiting triage Has not been triaged & therefore, not ready for work 🛠 goal: fix Bug fix 🟧 priority: high Stalls work on the project or its dependents labels Oct 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💻 aspect: code Concerns the software code in the repository 🛠 goal: fix Bug fix 🟧 priority: high Stalls work on the project or its dependents
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants