minor screen reader improvements

This commit is contained in:
Gani Georgiev
2026-04-18 22:11:42 +03:00
parent 624c3357be
commit 075e20efae
88 changed files with 298 additions and 256 deletions
+2 -2
View File
@@ -47,7 +47,7 @@ export function appHeader() {
},
() => {
if (link.icon) {
return t.i({ className: link.icon });
return t.i({ className: link.icon, ariaHidden: true });
}
},
t.span({ className: "txt" }, () => link.label),
@@ -63,7 +63,7 @@ export function appHeader() {
"html-popovertarget": "logged-user-dropdown",
},
t.span({ className: "superuser-name txt-ellipsis" }, () => app.store.superuser?.email),
t.i({ className: "ri-arrow-drop-down-line" }),
t.i({ className: "ri-arrow-drop-down-line", ariaHidden: true }),
),
t.div(
{
+1 -1
View File
@@ -105,7 +105,7 @@ window.app.components.colorPicker = function(propsArg = {}) {
className: "link-hint predefined-colors-btn",
"html-popovertarget": uniqueId + "predefined-colors-dropdown",
},
t.i({ className: "ri-arrow-down-s-line", roleHidden: true }),
t.i({ className: "ri-arrow-down-s-line", ariaHidden: true }),
),
t.div(
{
+1
View File
@@ -53,6 +53,7 @@ window.app.components.copyButton = function(textOrFunc, ...children) {
},
t.i({
hidden: children?.length,
ariaHidden: true,
className: () => `copy-icon ${data.active ? "ri-check-double-line" : "ri-file-copy-line"}`,
}),
...children,
+1 -1
View File
@@ -25,7 +25,7 @@ window.app.components.credits = function() {
},
() => {
if (link.icon) {
return t.i({ className: link.icon });
return t.i({ className: link.icon, ariaHidden: true });
}
},
t.span({ className: "txt" }, () => link.label),
+1
View File
@@ -335,6 +335,7 @@ window.app.components.erd = function(propsArg = {}) {
"html-data-field-name": () => field.name,
},
t.i({
ariaHidden: true,
title: () => field.type,
className: () =>
`field-icon ${
+4 -3
View File
@@ -243,7 +243,7 @@ window.app.components.fieldSettings = function(data, settingsArg = {}) {
}
},
},
t.i({ className: "ri-settings-3-line" }),
t.i({ className: "ri-settings-3-line", ariaHidden: true }),
),
t.button(
{
@@ -251,9 +251,9 @@ window.app.components.fieldSettings = function(data, settingsArg = {}) {
className: "btn sm circle transparent warning",
hidden: () => !data.field[toDeleteProp],
onclick: () => delete data.field[toDeleteProp],
ariaDescription: app.attrs.tooltip("Restore"),
ariaLabel: app.attrs.tooltip("Restore"),
},
t.i({ className: "ri-restart-line" }),
t.i({ className: "ri-restart-line", ariaHidden: true }),
),
),
(el) => {
@@ -334,6 +334,7 @@ window.app.components.fieldSettings = function(data, settingsArg = {}) {
{
hidden: () => !settings.showDuplicate && (!settings.showRemove || data.field.system),
type: "button",
title: "More options",
className: "btn sm circle transparent secondary more-btn m-l-auto",
"html-popovertarget": uniqueId + "_options_dropdown",
},
+1 -1
View File
@@ -251,7 +251,7 @@ function initSearch(selectFunc = null) {
title: "Clear search",
onclick: () => reset(),
},
t.i({ className: "ri-close-line" }),
t.i({ className: "ri-close-line", ariaHidden: true }),
);
}
}),
+2 -2
View File
@@ -37,7 +37,7 @@ window.app.components.refreshButton = function(propsArg = {}) {
hidden: () => props.hidden,
inert: () => props.inert,
type: "button",
ariaDescription: app.attrs.tooltip(() => props.tooltip),
ariaLabel: app.attrs.tooltip(() => props.tooltip),
disabled: () => props.disabled,
className: () => props.className,
onunmount: () => {
@@ -64,7 +64,7 @@ window.app.components.refreshButton = function(propsArg = {}) {
}, 500);
},
},
t.i({ className: "ri-refresh-line" }),
t.i({ className: "ri-refresh-line", ariaHidden: true }),
);
return btn;
+2 -2
View File
@@ -111,13 +111,13 @@ window.app.components.s3Test = function(propsArg = {}) {
if (data.hasError) {
return [
t.i({ className: "ri-error-warning-line txt-warning" }),
t.i({ className: "ri-error-warning-line txt-warning", ariaHidden: true }),
t.span({ className: "txt" }, "Failed to establish S3 connection"),
];
}
return [
t.i({ className: "ri-checkbox-circle-line txt-success" }),
t.i({ className: "ri-checkbox-circle-line txt-success", ariaHidden: true }),
t.span({ className: "txt" }, "S3 connected successfully"),
];
},
+5 -3
View File
@@ -116,6 +116,7 @@ window.app.components.searchHistoryButton = function(propsArg = {}) {
{
role: "button",
className: "remove-btn link-hint m-l-auto p-l-5 p-r-5",
title: "Clear",
onauxclick: (e) => {
e.stopPropagation();
return false;
@@ -126,7 +127,7 @@ window.app.components.searchHistoryButton = function(propsArg = {}) {
return false;
},
},
t.i({ className: "ri-close-line" }),
t.i({ className: "ri-close-line", ariaHidden: true }),
),
);
});
@@ -140,14 +141,15 @@ window.app.components.searchHistoryButton = function(propsArg = {}) {
hidden: () => props.hidden,
inert: () => props.inert,
type: "button",
title: "Search history",
className: () => props.btnClassName,
"html-popovertarget": uniqueId,
onunmount: () => {
watchers?.forEach((w) => w?.unwatch());
},
},
t.i({ className: "ri-search-line" }),
t.i({ className: "ri-arrow-drop-down-line" }),
t.i({ className: "ri-search-line", ariaHidden: true }),
t.i({ className: "ri-arrow-drop-down-line", ariaHidden: true }),
dropdown,
);
};
+3 -2
View File
@@ -194,10 +194,11 @@ window.app.components.select = function(propsArg = {}) {
t.button(
{
type: "button",
title: "Clear",
className: "btn sm secondary transparent circle",
onclick: () => clearSearch(true),
},
t.i({ className: "ri-close-line" }),
t.i({ className: "ri-close-line", ariaHidden: true }),
),
),
),
@@ -248,7 +249,7 @@ window.app.components.select = function(propsArg = {}) {
tabIndex: -1,
role: "button",
className: "ri-close-line link-hint btn-option-unset",
ariaDescription: app.attrs.tooltip("Unset", "left"),
ariaLabel: app.attrs.tooltip("Unset", "left"),
onclick: () => {
toggle(opt);
return false;
+1 -1
View File
@@ -137,7 +137,7 @@ function addToast(textOrElem, options = {}) {
title: "Clear",
onclick: () => removeToast(toastRef),
},
t.i({ className: "ri-close-line" }),
t.i({ className: "ri-close-line", ariaHidden: true }),
),
),
),
+1
View File
@@ -1,6 +1,7 @@
const tolerance = 5;
const tooltip = t.div({
ariaHidden: true,
popover: "manual",
className: "pb-tooltip",
});
+4 -1
View File
@@ -77,7 +77,10 @@ window.app.components.uploadedFileThumb = function(propsArg = {}) {
});
}
return t.i({ className: app.utils.fileTypeIcons[fileType] || "ri-file-line" });
return t.i({
className: app.utils.fileTypeIcons[fileType] || "ri-file-line",
ariaHidden: true,
});
},
);
};