mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-20 14:04:06 +01:00
This commit is contained in:
parent
66bbdf527e
commit
1a02d153e6
1 changed files with 5 additions and 1 deletions
|
|
@ -92,9 +92,13 @@ export const renderGallery = (options: {
|
|||
}
|
||||
const isEmpty = cellValueIsEmpty(cell.value);
|
||||
// NOTE: innerHTML 中不能换行否则 https://github.com/siyuan-note/siyuan/issues/15132
|
||||
let ariaLabel = escapeAttr(view.fields[fieldsIndex].name) || getColNameByType(view.fields[fieldsIndex].type);
|
||||
if (view.fields[fieldsIndex].desc) {
|
||||
ariaLabel += escapeAttr(`<div class="ft__on-surface">${view.fields[fieldsIndex].desc}</div>`);
|
||||
}
|
||||
galleryHTML += `<div class="av__cell${checkClass} ariaLabel"
|
||||
data-empty="${isEmpty}"
|
||||
aria-label="${escapeAttr(view.fields[fieldsIndex].name) || getColNameByType(view.fields[fieldsIndex].type)}"
|
||||
aria-label="${ariaLabel}"
|
||||
data-position="5west"
|
||||
data-id="${cell.id}"
|
||||
data-field-id="${view.fields[fieldsIndex].id}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue