From 8bc76ccf0bf7b1d7ca8e0d6f89e1cf63892d56b9 Mon Sep 17 00:00:00 2001 From: LD-Reborn Date: Mon, 24 Nov 2025 19:40:44 +0100 Subject: [PATCH] Improved inventory view screen reader navigation --- src/Views/Home/Inventory.cshtml | 76 ++++++++++++++++++++++++--------- 1 file changed, 57 insertions(+), 19 deletions(-) diff --git a/src/Views/Home/Inventory.cshtml b/src/Views/Home/Inventory.cshtml index b644043..b44cc1b 100644 --- a/src/Views/Home/Inventory.cshtml +++ b/src/Views/Home/Inventory.cshtml @@ -179,13 +179,29 @@

@T["Attributes"]

- ${Object.entries(asset.Description.Attributes) - .map(([k,v]) => ` -
- : - -
`) + + + + + + + + + + ${Object.entries(asset.Description.Attributes) + .map(([k,v]) => ` + + + + `) .join('')} + +
@T["Attribute name"]@T["Attribute value"]@T["Delete"]
+ + : + + +
` : ''} ${asset.Description?.Purchase ? ` @@ -194,7 +210,7 @@

@T["Purchase Information"]

- +
@@ -385,10 +401,20 @@
-
+

@T["Attributes"]

+ + + + + + + + + + +
@T["Attribute name"]@T["Attribute value"]@T["Delete"]
-
@@ -435,12 +461,18 @@ document.addEventListener('DOMContentLoaded', () => { let assetId = null; addAttrBtn.addEventListener('click', () => { - const row = document.createElement('div'); - row.className = 'd-flex gap-2 align-items-center attribute-row'; + const row = document.createElement('tr'); + row.className = 'attribute-row mb-3'; row.innerHTML = ` - - - + + + + + + + + + `; updateAttributesContainer.appendChild(row); }); @@ -486,12 +518,18 @@ document.addEventListener('DOMContentLoaded', () => { // Attributes if (asset.Description.Attributes) { for (const [attrName, attrValue] of Object.entries(asset.Description.Attributes)) { - const row = document.createElement('div'); - row.className = 'd-flex gap-2 align-items-center attribute-row'; + const row = document.createElement('tr'); + row.className = 'attribute-row mb-3'; row.innerHTML = ` - - - + + + + + + + + + `; updateAttributesContainer.appendChild(row); }