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

View File

@@ -7,7 +7,7 @@ export function batchAccordion(pageData) {
},
t.summary(
null,
t.i({ className: "ri-archive-stack-line" }),
t.i({ className: "ri-archive-stack-line", ariaHidden: true }),
t.span({ className: "txt" }, "Batch API"),
t.div({ className: "flex-fill" }),
() => {

View File

@@ -179,7 +179,9 @@ export function pageApplicationSettings() {
t.span({ className: "txt" }, "Hide/Lock collection and record controls"),
t.i({
className: "ri-information-line link-hint",
ariaDescription: app.attrs.tooltip("To prevent accidental changes when in production environment, collections create and update buttons will be hidden.\nRecords update will also require an extra unlock step before save.")
ariaDescription: app.attrs.tooltip(
"To prevent accidental changes when in production environment, collections create and update buttons will be hidden.\nRecords update will also require an extra unlock step before save.",
),
}),
),
),

View File

@@ -214,7 +214,7 @@ export function rateLimitAccordion(pageData) {
},
t.summary(
null,
t.i({ className: "ri-pulse-fill" }),
t.i({ className: "ri-pulse-fill", ariaHidden: true }),
t.span({ className: "txt" }, "Rate limiting"),
t.div({ className: "flex-fill" }),
() => {
@@ -397,7 +397,7 @@ export function rateLimitAccordion(pageData) {
className: "btn secondary sm",
onclick: () => newRule(),
},
t.i({ className: "ri-add-line" }),
t.i({ className: "ri-add-line", ariaHidden: true }),
t.span({ className: "txt" }, "Add rate limit rule"),
),
t.button(

View File

@@ -52,7 +52,7 @@ export function trustedProxyAccordion(pageData) {
},
t.summary(
null,
t.i({ className: "ri-route-line" }),
t.i({ className: "ri-route-line", ariaHidden: true }),
t.span({ className: "txt" }, "User IP proxy headers"),
() => {
if (proxyInfo.isLoading) {

View File

@@ -74,7 +74,7 @@ export function backupUploadButton(onSuccess = null) {
t.button(
{
type: "button",
ariaDescription: app.attrs.tooltip("Upload backup"),
ariaLabel: app.attrs.tooltip("Upload backup"),
className: () => `btn sm transparent secondary circle ${data.isUploading ? "loading" : ""}`,
disabled: () => data.isUploading,
onclick: () => fileInput?.click(),
@@ -82,7 +82,7 @@ export function backupUploadButton(onSuccess = null) {
app.pb.cancelRequest(uniqueId);
},
},
t.i({ className: "ri-upload-cloud-line" }),
t.i({ className: "ri-upload-cloud-line", ariaHidden: true }),
),
fileInput,
);

View File

@@ -108,6 +108,7 @@ export function backupsForm(propsArg = {}) {
t.span({ className: "txt" }, "Backup options"),
t.i({
className: () => (data.showForm ? "ri-arrow-up-s-line" : "ri-arrow-down-s-line"),
ariaHidden: true,
}),
),
app.components.slide(
@@ -177,7 +178,7 @@ export function backupsForm(propsArg = {}) {
"html-popovertarget": "cron-presets-dropdown",
},
t.span({ className: "txt" }, "Presets"),
t.i({ className: "ri-arrow-drop-down-line" }),
t.i({ className: "ri-arrow-drop-down-line", ariaHidden: true }),
),
t.div(
{

View File

@@ -133,7 +133,7 @@ export function backupsList(propsArg = {}) {
return data.backups.map((backup) => {
return t.div(
{ className: () => `list-item ${data.isLoading ? "faded" : ""}` },
t.i({ className: "ri-folder-zip-line" }),
t.i({ className: "ri-folder-zip-line", ariaHidden: true }),
t.div(
{ className: "content" },
t.span({
@@ -156,7 +156,7 @@ export function backupsList(propsArg = {}) {
t.button(
{
type: "button",
ariaDescription: app.attrs.tooltip("Download"),
ariaLabel: app.attrs.tooltip("Download"),
className: () =>
`btn sm circle secondary transparent ${
data.isDownloading[backup.key] ? "loading" : ""
@@ -164,22 +164,22 @@ export function backupsList(propsArg = {}) {
disabled: () => data.isDeleting[backup.key] || data.isDownloading[backup.key],
onclick: () => downloadBackup(backup.key),
},
t.i({ className: "ri-download-line" }),
t.i({ className: "ri-download-line", ariaHidden: true }),
),
t.button(
{
type: "button",
ariaDescription: app.attrs.tooltip("Restore"),
ariaLabel: app.attrs.tooltip("Restore"),
className: () => `btn sm circle secondary transparent`,
disabled: () => data.isDeleting[backup.key] || data.isDownloading[backup.key],
onclick: () => openBackupRestoreModal(backup.key),
},
t.i({ className: "ri-restart-line" }),
t.i({ className: "ri-restart-line", ariaHidden: true }),
),
t.button(
{
type: "button",
ariaDescription: app.attrs.tooltip("Delete"),
ariaLabel: app.attrs.tooltip("Delete"),
className: () =>
`btn sm circle secondary transparent ${
data.isDeleting[backup.key] ? "loading" : ""
@@ -187,7 +187,7 @@ export function backupsList(propsArg = {}) {
disabled: () => data.isDeleting[backup.key] || data.isDownloading[backup.key],
onclick: () => confirmBackupDelete(backup.key),
},
t.i({ className: "ri-delete-bin-7-line" }),
t.i({ className: "ri-delete-bin-7-line", ariaHidden: true }),
),
),
);
@@ -209,7 +209,7 @@ export function backupsList(propsArg = {}) {
() => {
if (data.canBackup) {
return [
t.i({ className: "ri-play-circle-line" }),
t.i({ className: "ri-play-circle-line", ariaHidden: true }),
t.span({ className: "txt" }, "Initialize new backup"),
];
}

View File

@@ -97,13 +97,13 @@ export function cronsList(propsArg = {}) {
t.button(
{
type: "button",
ariaDescription: app.attrs.tooltip("Run"),
ariaLabel: app.attrs.tooltip("Run"),
className: () =>
`btn sm circle secondary transparent ${data.isRunning[cron.id] ? "loading" : ""}`,
disabled: () => data.isRunning[cron.id],
onclick: () => runCron(cron.id),
},
t.i({ className: "ri-play-large-line" }),
t.i({ className: "ri-play-large-line", ariaHidden: true }),
),
),
);

View File

@@ -195,7 +195,7 @@ function mailTestModal(preselectedCollectionIdOrName = "", template = "") {
className: () => `btn expanded ${data.isSending ? "loading" : ""}`,
disabled: () => data.isSending || !data.canSubmit,
},
t.i({ className: "ri-mail-send-line" }),
t.i({ className: "ri-mail-send-line", ariaHidden: true }),
t.span({ className: "txt" }, "Send"),
),
),

View File

@@ -370,7 +370,7 @@ export function pageMailSettings(route) {
className: () => `btn expanded outline`,
onclick: () => app.modals.openMailTest(),
},
t.i({ className: "ri-mail-check-line" }),
t.i({ className: "ri-mail-check-line", ariaHidden: true }),
t.span({ className: "txt" }, "Send test email"),
);
},

View File

@@ -35,7 +35,7 @@ export function settingsSidebar() {
},
() => {
if (link.icon) {
return t.i({ className: link.icon });
return t.i({ className: link.icon, ariaHidden: true });
}
},
t.span({ className: "txt" }, () => link.label),

View File

@@ -132,6 +132,7 @@ export function collectionsDiffTable(propsArg = {}) {
}),
t.i({
className: "ri-arrow-right-line txt-sm",
ariaHidden: true,
}),
];
},

View File

@@ -179,7 +179,7 @@ export function pageExportCollections(route) {
{ className: "col-lg-12 txt-right" },
t.button(
{ className: "btn", onclick: download },
t.i({ className: "ri-download-line" }),
t.i({ className: "ri-download-line", ariaHidden: true }),
t.span({ className: "txt" }, "Download as JSON"),
),
),

View File

@@ -446,6 +446,7 @@ export function pageImportCollections(route) {
}),
t.i({
className: "ri-arrow-right-line txt-sm",
ariaHidden: true,
}),
];
},