diff --git a/ui/src/locales/en/common.json b/ui/src/locales/en/common.json index 39db3bf..e5ed547 100644 --- a/ui/src/locales/en/common.json +++ b/ui/src/locales/en/common.json @@ -467,9 +467,13 @@ "reopen": "Show the documents again", "reopenDetail": "Puts the first-run screen back so you can read the five documents. It changes nothing: your acceptance stays as it is, and closing that screen returns you here.", "contactTitle": "Contact", - "contactIntro": "PipDock is made by one person. Both addresses are read.", + "contactIntro": "PipDock is made by one person. Every address here is read.", "contactGeneral": "General questions and feedback", "contactCode": "Source code, security reports and licensing", + "a11yTitle": "Accessibility", + "a11yBody": "PipDock is meant to work with a keyboard alone, with a screen reader and in high contrast. The statement says what is supported and what is known not to work yet. If something gets in your way, write — in English or Vietnamese, and no GitHub account is needed.", + "a11yRead": "Read the accessibility statement", + "a11yContact": "Accessibility barriers and feedback", "copy": "Copy", "copyAddress": "Copy {{address}}", "copied": "Copied", diff --git a/ui/src/locales/vi/common.json b/ui/src/locales/vi/common.json index f54bcbd..d0e56c4 100644 --- a/ui/src/locales/vi/common.json +++ b/ui/src/locales/vi/common.json @@ -425,9 +425,13 @@ "reopen": "Xem lại các tài liệu", "reopenDetail": "Đưa màn hình chạy lần đầu trở lại để bạn đọc năm tài liệu. Nó không thay đổi gì cả: việc bạn đã chấp nhận vẫn giữ nguyên, và đóng màn hình đó sẽ đưa bạn về đây.", "contactTitle": "Liên hệ", - "contactIntro": "PipDock do một người làm ra. Cả hai địa chỉ đều được đọc.", + "contactIntro": "PipDock do một người làm ra. Mọi địa chỉ ở đây đều được đọc.", "contactGeneral": "Câu hỏi chung và góp ý", "contactCode": "Mã nguồn, báo cáo bảo mật và giấy phép", + "a11yTitle": "Khả năng tiếp cận", + "a11yBody": "PipDock được làm để dùng được chỉ với bàn phím, với trình đọc màn hình và ở chế độ tương phản cao. Bản tuyên bố nêu những gì đang được hỗ trợ và những gì đã biết là chưa hoạt động. Nếu có điều gì cản trở bạn, hãy viết thư — bằng tiếng Việt hoặc tiếng Anh, không cần tài khoản GitHub.", + "a11yRead": "Đọc tuyên bố về khả năng tiếp cận", + "a11yContact": "Rào cản và góp ý về khả năng tiếp cận", "copy": "Sao chép", "copyAddress": "Sao chép {{address}}", "copied": "Đã sao chép", diff --git a/ui/src/screens/PdAbout.test.tsx b/ui/src/screens/PdAbout.test.tsx index 5790e3e..de3678d 100644 --- a/ui/src/screens/PdAbout.test.tsx +++ b/ui/src/screens/PdAbout.test.tsx @@ -81,6 +81,24 @@ describe('PdAbout', () => { expect(writeText).toHaveBeenCalledTimes(2) }) + it('says where to report a barrier, and opens the accessibility statement', async () => { + // Someone who cannot use part of the app is the person least able to go and find a + // repository file about it. The address and the statement are on the screen every other + // contact is on. + render() + expect(screen.getByRole('heading', { level: 2, name: 'Accessibility' })).toBeInTheDocument() + + const address = 'accessibility@poli0981.dev' + expect(screen.getByText(address)).toBeInTheDocument() + fireEvent.click(screen.getByLabelText(`Copy ${address}`)) + await waitFor(() => { + expect(writeText).toHaveBeenCalledWith(address) + }) + + fireEvent.click(screen.getByRole('button', { name: 'Read the accessibility statement' })) + expect(openUrl).toHaveBeenCalledWith(`${REPO}/blob/main/ACCESSIBILITY.md`) + }) + it('opens the links page inside the capability scope', () => { render() fireEvent.click(screen.getByRole('button', { name: 'Open the links page' })) diff --git a/ui/src/screens/PdAbout.tsx b/ui/src/screens/PdAbout.tsx index 2d10bb2..f64709c 100644 --- a/ui/src/screens/PdAbout.tsx +++ b/ui/src/screens/PdAbout.tsx @@ -29,12 +29,22 @@ import { useLegalStore } from '@/stores' /** SPDX identifier from `Cargo.toml` and `package.json`. An identifier, never translated. */ const LICENSE = 'GPL-3.0-only' -/** Where to write. Both are read. */ +/** Where to write. All three are read. */ const CONTACT = { general: 'contact@poli0981.dev', code: 'code@poli0981.dev', + accessibility: 'accessibility@poli0981.dev', } as const +/** + * The accessibility statement, in the app and not only in the repository. + * + * Someone who cannot use part of PipDock is the person least able to go looking for a file about + * it. The statement says what is supported, what is known not to work, and how to report a + * barrier without a GitHub account — which is what the address below is for. + */ +const ACCESSIBILITY = `${REPO}/blob/main/ACCESSIBILITY.md` + /** The one page listing every other channel. Scoped in `capabilities/external-links.json`. */ const LINKS = 'https://poli0981.dev/links/' @@ -151,6 +161,21 @@ export function PdAbout() { +

{t('about.a11yTitle')}

+

{t('about.a11yBody')}

+

+ +

+ +

{t('about.linksTitle')}

{t('about.linksIntro')}