Improve accessibility labels for novel and project trees

This commit is contained in:
Veronica Berglyd Olsen
2025-05-11 18:32:10 +02:00
parent 4417e275fd
commit 9b0890c9b7
5 changed files with 21 additions and 12 deletions
+2
View File
@@ -46,6 +46,7 @@ R_TEXT = Qt.ItemDataRole.DisplayRole
R_ICON = Qt.ItemDataRole.DecorationRole
R_ALIGN = Qt.ItemDataRole.TextAlignmentRole
R_TIP = Qt.ItemDataRole.ToolTipRole
R_ACCESS = Qt.ItemDataRole.AccessibleTextRole
R_HANDLE = 0xff01
R_KEY = 0xff02
@@ -217,6 +218,7 @@ class NovelModel(QAbstractTableModel):
text = ", ".join(refs)
data[C_FACTOR*2 | R_TEXT] = text
data[C_FACTOR*2 | R_TIP] = f"<b>{self._extraLabel}:</b> {text}"
data[C_FACTOR*2 | R_ACCESS] = f"{self._extraLabel}: {text}"
data[C_FACTOR*3 | R_ICON] = self._more
data[R_HANDLE] = handle
data[R_KEY] = key