mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-18 07:59:03 +01:00
Better tooltips for tagify
This commit is contained in:
parent
f679e87a4b
commit
60740db9a7
1 changed files with 4 additions and 2 deletions
|
|
@ -159,7 +159,8 @@ export const tagifyElement = (element, options, onChange, tagifyOptions = {}) =>
|
||||||
return {
|
return {
|
||||||
value: key,
|
value: key,
|
||||||
name: game.i18n.localize(option.label),
|
name: game.i18n.localize(option.label),
|
||||||
src: option.src
|
src: option.src,
|
||||||
|
description: option.description
|
||||||
};
|
};
|
||||||
}),
|
}),
|
||||||
maxTags: maxTags,
|
maxTags: maxTags,
|
||||||
|
|
@ -173,11 +174,12 @@ export const tagifyElement = (element, options, onChange, tagifyOptions = {}) =>
|
||||||
},
|
},
|
||||||
templates: {
|
templates: {
|
||||||
tag(tagData) {
|
tag(tagData) {
|
||||||
return `<tag title="${tagData.title || tagData.value}"
|
return `<tag
|
||||||
contenteditable='false'
|
contenteditable='false'
|
||||||
spellcheck='false'
|
spellcheck='false'
|
||||||
tabIndex="${this.settings.a11y.focusableTags ? 0 : -1}"
|
tabIndex="${this.settings.a11y.focusableTags ? 0 : -1}"
|
||||||
class="${this.settings.classNames.tag} ${tagData.class ? tagData.class : ''}"
|
class="${this.settings.classNames.tag} ${tagData.class ? tagData.class : ''}"
|
||||||
|
data-tooltip="${tagData.description || tagData.name}"
|
||||||
${this.getAttributes(tagData)}>
|
${this.getAttributes(tagData)}>
|
||||||
<x class="${this.settings.classNames.tagX}" role='button' aria-label='remove tag'></x>
|
<x class="${this.settings.classNames.tagX}" role='button' aria-label='remove tag'></x>
|
||||||
<div>
|
<div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue