Add title attribute to actor roles (#6344)

Co-authored-by: engine <engine@pentagon.usa.gov>
This commit is contained in:
othmar52
2025-02-20 23:59:34 +01:00
committed by GitHub
parent 1c2d7ef918
commit d2f522a1e0
+2 -1
View File
@@ -706,7 +706,8 @@ function getCardFooterText(item, apiClient, options, footerClass, progressHtml,
if (item.Role) {
if ([ PersonKind.Actor, PersonKind.GuestStar ].includes(item.Type)) {
// List actor roles formatted like "as Character Name"
lines.push(globalize.translate('PersonRole', escapeHtml(item.Role)));
const roleText = globalize.translate('PersonRole', escapeHtml(item.Role));
lines.push(`<span title="${roleText}">${roleText}</span>`);
} else if (item.Role.toLowerCase() === item.Type.toLowerCase()) {
// Role and Type are the same so use the localized Type
lines.push(escapeHtml(globalize.translate(item.Type)));