mirror of
https://github.com/ether/etherpad-lite.git
synced 2026-05-05 04:06:37 +02:00
i18n + a11y for admin disables warning (review feedback) (#7652)
Replace the hardcoded "Disables:" label and the inline title attribute with proper i18n keys (admin_plugins.disables.label, admin_plugins.disables.warning_title) and add role="alert" so screen readers announce the warning instead of treating it as visual noise. Per user review on #7649: "we should display it as a warning only if a plugin disables a test... Also i18n!!! Always remember to do i18n." Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
56596e21bb
commit
ea3032c079
@ -234,7 +234,8 @@ export const HomePage = () => {
|
||||
{plugin.disables && plugin.disables.length > 0 && (
|
||||
<div
|
||||
className="plugin-disables"
|
||||
title="This plugin intentionally removes the listed Etherpad features."
|
||||
role="alert"
|
||||
title={t('admin_plugins.disables.warning_title')}
|
||||
style={{
|
||||
marginTop: '0.25rem',
|
||||
padding: '0.2rem 0.5rem',
|
||||
@ -246,7 +247,7 @@ export const HomePage = () => {
|
||||
display: 'inline-block',
|
||||
}}
|
||||
>
|
||||
<strong>Disables: </strong>
|
||||
<strong><Trans i18nKey="admin_plugins.disables.label"/></strong>{' '}
|
||||
{plugin.disables
|
||||
.map((tag) => tag.replace(/^@feature:/, ''))
|
||||
.join(', ')}
|
||||
|
||||
@ -7,6 +7,8 @@
|
||||
"admin_plugins.available_install.value": "Install",
|
||||
"admin_plugins.available_search.placeholder": "Search for plugins to install",
|
||||
"admin_plugins.description": "Description",
|
||||
"admin_plugins.disables.label": "Disables:",
|
||||
"admin_plugins.disables.warning_title": "This plugin intentionally removes the listed Etherpad features.",
|
||||
"admin_plugins.installed": "Installed plugins",
|
||||
"admin_plugins.installed_fetching": "Fetching installed plugins…",
|
||||
"admin_plugins.installed_nothing": "You haven't installed any plugins yet.",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user