Merge pull request #239 from poli0981/docs/accessibility-statement

feat(legal): accessibility statement — ACCESSIBILITY.md, Legal Center page, issue form
This commit is contained in:
poli0981 authored and GitHub committed 2026-11-09 20:19:16 +07:00
commit 754b669f4d
27 files changed
+508 -19

No files matched your search

+123
View File
@@ -0,0 +1,123 @@
name: Accessibility barrier
description: Something stops or slows you down when you use a keyboard, a screen reader, zoom, high contrast, voice control or a touch screen.
title: "[A11y]: "
labels: ["accessibility", "triage"]
body:
- type: markdown
attributes:
value: |
Thanks for telling us. You don't need to know what causes the problem — describe what you tried and what happened.
Prefer not to post in public? Email **contact@poli0981.dev** with `[Accessibility]` at the start of the subject.
How reports are handled: [ACCESSIBILITY.md](https://github.com/poli0981/youtube-generator/blob/main/ACCESSIBILITY.md#reporting-a-barrier).
- type: textarea
id: barrier
attributes:
label: What happened?
description: What were you trying to do, and what got in the way?
placeholder: e.g. "With NVDA, the Copy Title button is announced only as 'button'."
validations:
required: true
- type: textarea
id: repro
attributes:
label: Steps to reproduce
description: The page, then numbered steps — keys you pressed, gestures or voice commands.
placeholder: |
1. Open Output
2. Press Tab until the Copy Title button
3. Listen to what the screen reader says
validations:
required: true
- type: textarea
id: expected
attributes:
label: What did you expect?
validations:
required: true
- type: dropdown
id: assistive-tech
attributes:
label: Assistive technology or setting
description: Pick everything you were using.
multiple: true
options:
- Keyboard only
- Narrator (Windows)
- NVDA
- JAWS
- VoiceOver (macOS / iOS)
- TalkBack (Android)
- Orca (Linux)
- Screen magnifier / browser zoom
- Speech input / voice control
- High contrast / forced colours
- Reduce motion
- Switch access
- Other (say which below)
validations:
required: true
- type: input
id: assistive-tech-version
attributes:
label: Version of that tool (if you know it)
placeholder: e.g. NVDA 2026.3, VoiceOver on macOS 26
- type: dropdown
id: severity
attributes:
label: How much does it stop you?
description: The levels are explained in ACCESSIBILITY.md.
options:
- Critical — I can't finish a core task (write, generate, copy, save, get past the website check)
- High — I can finish it, but only with real difficulty or a workaround
- Medium — it works, but inconsistently or confusingly
- Low — a minor annoyance
validations:
required: true
- type: input
id: version
attributes:
label: App version
description: From the About page. Example `v1.5.1`.
placeholder: v1.5.1
validations:
required: true
- type: dropdown
id: surface
attributes:
label: Where are you running YTDescGen?
options:
- Web (ytgenerator.stream)
- Desktop — Windows (Tauri)
- Desktop — macOS (Tauri)
- Desktop — Linux (Tauri)
- Android (APK)
- Local dev (npm run dev)
validations:
required: true
- type: input
id: os
attributes:
label: Operating system and browser
description: e.g. Windows 11 25H2 + Edge 141, macOS 26 + Safari 26, Android 15. Leave the browser out for the desktop and Android apps.
validations:
required: true
- type: dropdown
id: language
attributes:
label: App language
options:
- English (en)
- Tiếng Việt (vi)
- 日本語 (ja)
- Español (es)
- 한국어 (ko)
- 简体中文 (zh)
- Português (BR) (pt-BR)
- Bahasa Indonesia (id)
validations:
required: true
- type: textarea
id: recording
attributes:
label: Screen recording, screenshot or screen reader output (optional)
description: Drag and drop files here, or paste what the screen reader said.
@@ -40,6 +40,7 @@ body:
- Backup & restore
- i18n / locales
- Settings
- Accessibility (keyboard, screen readers, zoom, contrast)
- Web app (ytgenerator.stream)
- Desktop (Tauri)
- Android
+14
View File
@@ -42,6 +42,20 @@ If this PR touches the UI, attach screenshots or short recordings at:
Otherwise delete this section.
-->
## Accessibility
<!--
If this PR touches the UI, check each item (see ACCESSIBILITY.md#for-contributors).
Otherwise delete this section.
-->
- [ ] Works with the keyboard alone: logical focus order, visible focus, Esc closes, no focus trap
- [ ] Every control has a name and every field a label (`Field`, `IconButton`); new `aria-label` text is in all 8 locales
- [ ] Errors and status changes are announced (alert banner, toast or live region)
- [ ] Colour is not the only signal; design tokens only, and the contrast test passes
- [ ] New animation respects reduced motion; targets are at least 24 × 24 px
- [ ] Checked once with a screen reader (Narrator, VoiceOver, NVDA or Orca)
## AI-Assisted Contribution
- [ ] Yes — AI tool used: <!-- e.g. Claude Code (Claude Opus 5.5), Cursor, GitHub Copilot -->
+127
View File
@@ -0,0 +1,127 @@
# Accessibility
**Last updated:** 2026-11-09
YTDescGen should work for everyone who makes videos, including people who use a keyboard instead of a mouse, a screen reader, zoom or magnification, high-contrast modes, voice control or a touch screen. This statement says what works today, how it is checked, what doesn't work yet, and how to tell us about a barrier.
It covers the website at [ytgenerator.stream](https://ytgenerator.stream), the desktop apps (Windows, macOS, Linux) and the Android app. They share one interface, so what is said here applies to all of them unless a platform is named.
## Our goal
We aim for [WCAG 2.2](https://www.w3.org/TR/WCAG22/) level **AA**. That is a goal, not a claim of conformance: YTDescGen is a solo open-source project and has not had an independent audit. When we find something that falls short, it is fixed or listed under [Known limitations](#known-limitations).
## What works today
### Keyboard
- Every page, menu and dialog works with the keyboard alone. **Skip to content** is the first stop on the app's pages, and a visible outline shows where the focus is.
- Dialogs keep the focus inside while they are open, close with **Esc**, and give the focus back to the control that opened them.
- Shortcuts work on every page:
- **Ctrl/⌘ + K**: command palette (any page, copy, profiles, presets, templates, theme, languages).
- **Ctrl/⌘ + G** or **Ctrl/⌘ + Enter**: Output.
- **Ctrl/⌘ + Shift + C**: Copy All.
- **Ctrl/⌘ + S**: save to History.
- **Ctrl/⌘ + B**: sidebar.
- **Alt + T**: notifications.
- **Ctrl/⌘ + /** (or **?**): the full list.
- The single-key **?** shortcut can be turned off in **Settings › Editor › Single-key shortcuts**, for speech input and stray key presses.
### Screen readers
- Every control has a name, including icon-only buttons, and every field has a label. Hints and errors are tied to their field.
- Confirmations and errors are announced ("Copied!", "Saved to History", why something can't be copied), and so are Strict Mode problems.
- After you open another page, its name is read out. The focus stays on the link you used.
- Each page has its own title and a single main heading, and the page language follows the interface language you pick (eight languages).
- Generated titles, descriptions and tags are marked with the language they were written in, so a Japanese description is read with a Japanese voice even when the interface is in English.
### Vision
- Dark and light themes, both at WCAG AA contrast for text (4.5:1) on every background. A test keeps them there ([tests/styles/contrast.test.ts](tests/styles/contrast.test.ts)).
- The layout reflows from wide screens down to phone width, so zooming in moves content into one column instead of off the screen.
- The desktop apps zoom with **Ctrl/⌘ + =** and **Ctrl/⌘ + −** (Ctrl + mouse wheel works on Windows too). On Android, pinch to zoom.
- In Windows High Contrast (forced colours), the focus outline stays visible.
- **Settings › Appearance › Hide scrollbars** removes the scrollbars; scrolling still works with the keyboard, mouse wheel and touch.
### Motion
- With **Reduce motion** turned on in your operating system, animations and smooth scrolling are switched off.
### Touch
- On touch screens, buttons and fields grow to about 44 px, and so do small close and dismiss buttons.
### The website's check page
- The Cloudflare Turnstile check before the website usually finishes on its own. Its status ("Checking your browser…", errors) is announced, and it works with the keyboard. See [Known limitations](#known-limitations) if Cloudflare asks you to solve a challenge.
## How it is checked
- **By hand.** The maintainer uses YTDescGen with the keyboard alone (mouse unplugged) and with Windows Narrator, through the main flows: editor, output, copying, profiles, presets, templates, History, Settings and backups.
- **Automatically.** A unit test checks the contrast of every colour token in both themes.
- **Design rules.** Interface parts come from accessible building blocks (Radix primitives). An icon-only button can't be built without a name, and every field gets its label and error wiring from one shared component.
The app has **not** been tested yet with NVDA, JAWS, VoiceOver (macOS), TalkBack (Android) or Orca (Linux). Reports from people who use them are very welcome.
## Supported environments
| Platform | Runs on | Screen reader |
| --- | --- | --- |
| Windows: desktop app, or the website in Edge / Chrome | Windows 10 or 11 with WebView2; Chrome or Edge 111+ | Narrator: tested |
| Website on other browsers | Firefox 114+, Safari 16.4+ | Not tested yet |
| macOS desktop app | macOS 11 or later, Apple silicon | VoiceOver: not tested yet |
| Linux desktop app | WebKitGTK 2.40 or later | Orca: not tested yet |
| Android app | Android 11 or later, current Android System WebView | TalkBack: not tested yet |
## Known limitations
- **Cloudflare's challenge on the website.** If Turnstile asks you to solve a challenge instead of passing on its own, that challenge is Cloudflare's, and its accessibility is theirs to fix. If it stops you, the desktop and Android apps have no check page at all, or [email us](#reporting-a-barrier).
- **Field borders are faint.** The outline of an empty text field is about 1.2–1.3:1 against the page, under the 3:1 that WCAG asks for. Fields are still marked by their labels, and the focused field gets an accent border and ring.
- **The Continue button on the first-run screen** uses the brand gradient. White text on its lighter violet end is 3.96:1.
- **Character counters are not read out as you type.** That would interrupt every keystroke. When a field is over YouTube's limit, copying it is refused with a message that says why, and Strict Mode lists the problem in an announced banner.
- **No automated accessibility linting yet.** `eslint-plugin-jsx-a11y` does not support ESLint 10, which the project uses, and the unit tests run without a browser DOM. Checks are manual (see above) apart from the contrast test.
- **Translations.** Interface languages other than English and Vietnamese were translated with AI assistance (see the [Disclaimer](DISCLAIMER.md)). Some labels may sound unnatural when read aloud.
- **Emoji in descriptions.** Generated descriptions use a few emoji as section markers (for example 👍 and 🔔), and screen readers on YouTube read them out by name.
## Reporting a barrier
If something in YTDescGen gets in your way, please tell us. You don't need to know what causes it.
- **Preferred:** open an [accessibility issue](https://github.com/poli0981/youtube-generator/issues/new?template=accessibility.yml). The form asks for the platform, the assistive technology you use and what happened.
- **Not comfortable posting publicly?** Email **contact@poli0981.dev** with `[Accessibility]` at the start of the subject.
- **Quick question?** Ask on [Discord](https://discord.gg/kDM9GMu5vm).
### Severity
| Level | Meaning |
| --- | --- |
| **Critical** | You can't finish a core task: write, generate, copy, save, or get past the website's check. |
| **High** | You can finish it, but only with real difficulty or a workaround. |
| **Medium** | It works, but inconsistently or confusingly. |
| **Low** | A minor annoyance that doesn't stop you. |
### How we respond
- We reply within **7 days**, and we will take your report at face value.
- **Critical** barriers are fixed in the next patch release. Others are planned like any other bug, with the more severe first.
- If there is a workaround, we tell you while the fix is on its way.
- When the fix ships, we'll ask you to check it if you're willing.
This is a one-person project, so timelines are honest estimates, not guarantees. If one slips, we'll say so in the issue.
## For contributors
Changes to the interface should keep everything above true. Before opening a pull request that touches the UI:
- **Keyboard.** Everything works with the keyboard: the focus order makes sense, the focus outline is visible, **Esc** closes what you opened, and nothing traps the focus.
- **Names.** Use the shared `Field` (label, hint and error wiring) and `IconButton` (which can't be rendered without a `label`) components. `aria-label` text goes through `t()` like any other string, in all eight locales.
- **Errors and status.** They are announced: `Banner` with `alert`, a toast, or an existing live region.
- **Colour.** Colour is never the only signal. Use the design tokens only, and run `npm run test:run`. The contrast test fails if a token drops under AA, and white text belongs on the `*-solid` fills.
- **Motion.** New animation respects reduced motion. Motion's components do this already, and CSS animations are covered by the global rule in `globals.css`.
- **Targets.** Anything clickable is at least 24 × 24 px and grows on touch screens.
- **Screen reader.** Try the change once with a screen reader: Narrator (Win + Ctrl + Enter), VoiceOver (⌘ + F5), NVDA or Orca.
The pull request template has the same checklist.
## Feedback on this statement
Ideas for improving this statement or the way accessibility is handled are welcome in [GitHub Discussions](https://github.com/poli0981/youtube-generator/discussions). Please report barriers through the [reporting process](#reporting-a-barrier) so they can be tracked.
+4 -1
View File
@@ -103,7 +103,9 @@ LICENSES/ # license texts for REUSE
### Styling
- Tailwind utilities and the design tokens (`bg-surface-1`, `text-text-muted`, `accent`, …) — no hard-coded colours, no inline styles.
- Dark by default, light via class; touch targets grow on coarse pointers.
- Dark by default, light via class; touch targets grow on coarse pointers (`pointer-coarse:`), nothing clickable under 24 px.
- Contrast is WCAG AA in both themes and `tests/styles/contrast.test.ts` checks every token: text tokens on surfaces, white text only on the `*-solid` fills (`bg-accent-solid`, `bg-danger-solid`), never on `bg-accent`.
- Focus: the global `:focus-visible` outline; a control that swaps it for a ring uses `outline-hidden` (stays visible in forced colours), not `outline-none`.
- Watch Tailwind 4 specificity: a base `inline-flex` beats a plain `hidden` — wrap responsive visibility in an element.
### i18n
@@ -179,6 +181,7 @@ npm run generate:brand # favicon, PWA icons, link-preview card from assets/
- New video type: `src/config/video-types.ts` + every `templates.json` (titles, intros, pinned-comment greetings).
- New content warning / tech note: the id in `CONTENT_WARNINGS` / `TECH_NOTES` (`src/engine/types.ts`), a group in `src/config/content-warning-groups.ts` / `tech-note-groups.ts`, the editor label (`ui.json`) and description line (`templates.json`) in all 8 locales and `_schema.json` — tests fail on any gap — and the row in `docs/CONTENT-INVENTORY.md` (+ vi). Don't repeat a fact that has its own field (language patch, game version, difficulty, the Video settings upscaler).
- New store platform: `src/config/platforms.ts` (URL pattern, `tagName`), optionally a name extractor in `src/utils/url-extractors.ts`.
- UI changes follow the accessibility checklist in `ACCESSIBILITY.md` (#for-contributors): keyboard, names via `Field` / `IconButton`, announced errors, tokens only, reduced motion, 24 px targets. Generated text gets `lang` (the output language); pages name themselves with `useDocumentTitle`, which `RouteAnnouncer` reads out. Update ACCESSIBILITY.md (+ `docs/i18n/vi/`) when what it promises changes.
- Never commit `note.txt`, `warning.txt` or `__pycache__/`; never put real secrets in files (`.dev.vars` holds Cloudflare's public Turnstile test keys only).
- SonarCloud (project `poli0981_youtube-generator`) is CI-based: the `sonarcloud` job in `ci.yml` scans every PR from this repository and every push to `main`, with the coverage from `check`; settings in `sonar-project.properties`; Automatic Analysis is off. Keep it at 0 open issues and the quality gate (Sonar way: A ratings, reviewed hotspots, ≤ 3 % duplication, ≥ 80 % coverage on new code) green — the job fails with the gate. Coverage covers what `coverage.include` in `vitest.config.ts` lists (the logic layers); everything else is in `sonar.coverage.exclusions`, because a file missing from the LCOV report counts as 0 % — a new source folder goes into one list or the other. The version passed to the scanner starts each release's new-code period. Fork and Dependabot PRs skip the scan (no `SONAR_TOKEN`). Check a PR with `https://sonarcloud.io/api/issues/search?componentKeys=poli0981_youtube-generator&pullRequest=<n>&resolved=false` and its gate with `https://sonarcloud.io/api/qualitygates/project_status?projectKey=poli0981_youtube-generator&pullRequest=<n>`. Workflows install with `npm ci --ignore-scripts` and call local binaries (`npm run …`), never `npx` for a package that isn't installed.
- TypeScript bumps may be manual: `@typescript/native` (`npm:typescript@^7`) and `typescript` (`npm:@typescript/typescript6@^6`) are npm aliases Dependabot may not follow. Stop the dev server before `npm ci` on Windows — it locks native modules (EPERM).
+6 -1
View File
@@ -33,6 +33,7 @@ Use the templates in `.github/ISSUE_TEMPLATE/`:
- **Bug report** — only if you can reproduce on the latest release.
- **Feature request** — only with a concrete use case, not abstract requests.
- **Accessibility barrier** — anything that gets in the way with a keyboard, a screen reader, zoom, high contrast, voice control or touch. No reproduction on the latest release needed, and you don't need to know the cause. See [ACCESSIBILITY.md](./ACCESSIBILITY.md#reporting-a-barrier).
### Pull Requests
@@ -44,6 +45,10 @@ Use the templates in `.github/ISSUE_TEMPLATE/`:
- All locale files must stay in lock-step — see the i18n section below.
- AI-assisted contributions are welcome but **must be disclosed** in the PR description.
### Accessibility
UI changes keep YTDescGen usable with the keyboard alone and with screen readers. Run through the checklist in [ACCESSIBILITY.md](./ACCESSIBILITY.md#for-contributors) (the PR template repeats it); the contrast test (`tests/styles/contrast.test.ts`) fails if a colour token drops under WCAG AA.
### i18n Contributions
If your change adds or removes any user-facing string:
@@ -85,7 +90,7 @@ The following are closed without review and may result in a contributor ban —
## Contact
Questions about contributing or conduct: `code@poli0981.dev`. Security issues go through [SECURITY.md](./SECURITY.md), never a public issue.
Questions about contributing or conduct: `code@poli0981.dev`. Security issues go through [SECURITY.md](./SECURITY.md), never a public issue. Accessibility barriers you'd rather not post publicly: `contact@poli0981.dev`, subject starting with `[Accessibility]`.
## License
+3 -1
View File
@@ -39,7 +39,8 @@ Built for the gameplay no-commentary niche — especially horror / scary games
- **Command palette** (Ctrl/⌘ + K) and keyboard shortcuts.
- **Contact emails by purpose** — one contact line, or separate lines for contact, advertising, game keys & playtest and copyright / DMCA, each purpose address checked for a word that says what it is for (`sponsor@…`, `keys@…`, `dmca@…`).
- **Guardrails** — length caps on every field and an opt-in **Strict Mode** that blocks copy and export while a field has an error.
- **Dark and light themes**, larger controls on touch screens, and an option to hide every scrollbar.
- **Dark and light themes** at WCAG AA contrast, larger controls on touch screens, and an option to hide every scrollbar.
- **Accessible** — works with the keyboard alone and with screen readers (generated text is marked with its language), respects reduce motion, zooms on desktop; see [ACCESSIBILITY.md](./ACCESSIBILITY.md).
- **Desktop app** — Windows, macOS & Linux via Tauri; **Android app** — Android 11+, sideloaded from [Releases](https://github.com/poli0981/youtube-generator/releases).
## Quick Start
@@ -109,6 +110,7 @@ Architecture overview: [`docs/ARCHITECTURE.md`](./docs/ARCHITECTURE.md).
| [Packaging](./docs/PACKAGING.md) | Tauri desktop + Android release builds and signing. |
| [Contributing](./CONTRIBUTING.md) | PR process, commit conventions, required checks. |
| [Security](./SECURITY.md) | Reporting vulnerabilities. |
| [Accessibility](./ACCESSIBILITY.md) | What works with a keyboard, screen readers and zoom, known gaps, how to report a barrier. _(Also: [Vietnamese](./docs/i18n/vi/ACCESSIBILITY.md).)_ |
| [Privacy](./PRIVACY.md) | What is stored where, and what Cloudflare processes. |
| [Terms of Use](./TERMS.md) | Acceptable use, license compliance, DMCA. |
| [Disclaimer](./DISCLAIMER.md) | AI-assistance and translation-quality disclosure. _(Also: [Vietnamese](./docs/i18n/vi/DISCLAIMER.md).)_ |
+2 -2
View File
@@ -6,8 +6,8 @@ Only the latest released version of YTDescGen receives security updates, and the
| Version | Supported |
| ------- | --------- |
| 1.3.x | ✅ |
| < 1.3 | ❌ |
| 1.5.x | ✅ |
| < 1.5 | ❌ |
## Reporting a Vulnerability
+5 -2
View File
@@ -211,6 +211,8 @@ const DOC_SUMMARIES: Readonly<Record<LegalDocId, string>> = {
license: "The Apache License 2.0 the source code is released under.",
"third-party": "Open-source libraries, fonts and services YTDescGen relies on.",
security: "How to report a vulnerability privately, and what is in scope.",
accessibility:
"What works with a keyboard, screen readers and zoom, known gaps, and how to report a barrier.",
notice: "The Apache-2.0 NOTICE file with copyright and attribution.",
conduct: "Contributor Covenant rules for the project's community spaces.",
};
@@ -259,6 +261,7 @@ const TITLE_BY_ID: Record<LegalDocId, string> = {
license: "License (Apache-2.0)",
"third-party": "Third-Party Notices",
security: "Security Policy",
accessibility: "Accessibility",
notice: "NOTICE",
conduct: "Code of Conduct",
};
@@ -296,10 +299,10 @@ function indexPage(): string {
return pageShell({
title: "Legal",
canonicalPath: "/legal",
description: "Terms, privacy, licensing and security information for YTDescGen.",
description: "Terms, privacy, licensing, security and accessibility information for YTDescGen.",
activeId: null,
lang: "en",
body: `<article><h1>Legal</h1><p>Terms, privacy, licensing and security information for YTDescGen — the same documents the app shows in its Legal Center.</p><div class="cards">${cards}</div></article>`,
body: `<article><h1>Legal</h1><p>Terms, privacy, licensing, security and accessibility information for YTDescGen — the same documents the app shows in its Legal Center.</p><div class="cards">${cards}</div></article>`,
});
}
+1
View File
@@ -246,3 +246,4 @@ docs/I18N.md). The restart advice above still applies to all of them.
- [PACKAGING.md](./PACKAGING.md) — Tauri release builds and signing.
- [Top-level CONTRIBUTING.md](../CONTRIBUTING.md) — PR process, commit conventions, auto-ignore rules.
- [Top-level SECURITY.md](../SECURITY.md) — reporting vulnerabilities.
- [Top-level ACCESSIBILITY.md](../ACCESSIBILITY.md) — what works with assistive technology, and the checklist for UI changes.
+24 -1
View File
@@ -367,6 +367,26 @@ a pasted store link can each be undone from the toast they show.
- Dark and light themes; scrollbars can be hidden (v1.1.0); animated icons
follow the system's _reduce motion_; controls grow on touch screens.
### ♿ Accessibility (v1.5.1)
The statement is [ACCESSIBILITY.md](../ACCESSIBILITY.md) (also in the Legal
Center, in English and Vietnamese). In short:
- **Keyboard** — everything works without a mouse: skip link, visible focus,
dialogs that keep and return focus, the shortcuts below; the bare `?` can
be turned off (Settings › Editor › Single-key shortcuts, WCAG 2.1.4).
- **Screen readers** — named controls and labelled fields, announced
confirmations and errors, the new page's name read out after a navigation
(`RouteAnnouncer`), translated toast labels, and generated text marked with
its language (`lang`) so it is read with the right voice.
- **Vision** — both themes at WCAG AA text contrast, checked by
`tests/styles/contrast.test.ts`; white text sits on the darker
`accent-solid` / `danger-solid` fills; focus stays visible in Windows High
Contrast; desktop zoom with Ctrl/⌘ + = / − (`zoomHotkeysEnabled`).
- **Reporting** — the _Accessibility barrier_ issue form
(`.github/ISSUE_TEMPLATE/accessibility.yml`), or `contact@` with
`[Accessibility]`.
## 💾 Data Persistence
Everything stays on the device: the browser's storage for
@@ -416,7 +436,9 @@ In **Settings › Backup & restore**:
| `Ctrl/⌘+Shift+C` | Copy All — same limits and Strict Mode rules as the Output page |
| `Ctrl/⌘+S` | Save the current output to History |
| `Ctrl/⌘+B` | Collapse / expand the sidebar |
| `Ctrl/⌘+/` or `?` | Show keyboard shortcuts (`?` only outside text fields) |
| `Alt+T` | Go to the notifications (while any are on screen) |
| `Ctrl/⌘+/` or `?` | Show keyboard shortcuts (`?` only outside text fields, while Settings › Editor › Single-key shortcuts is on) |
| `Ctrl/⌘+=` / `Ctrl/⌘+−` | Zoom in / out — desktop app (v1.5.1) |
| `Escape` | Close modal |
## 🔧 Settings
@@ -430,6 +452,7 @@ In **Settings › Backup & restore**:
| Show Character Count | boolean | true | Display char counters on output. **Does not** affect copy blocking |
| Compact Tag Display | boolean | false | Tags as comma list vs chip display |
| Copy All includes the tags | boolean | false | v1.0.0. Copy All copies title, description, then tags |
| Single-key shortcuts | boolean | true | v1.5.1. `?` opens the shortcut list outside text fields; off leaves Ctrl/⌘ + / only (speech input, stray key presses) |
| **Strict Mode** | boolean | **false** | v0.35.0. Blocks Generate / Copy / Export while any field has a hard error |
| Show quality badge | boolean | true | `[2K 60FPS]`-style badge in the title when resolution or FPS is above the defaults; `[4K Upscaled]` for an upscaled video (v1.5.0) |
| Title order | game first / video first | game first | v1.0.0. "Hades — Part 3" or "Part 3 — Hades" |
+129
View File
@@ -0,0 +1,129 @@
# Khả năng tiếp cận
> **Lưu ý dịch thuật:** Tiếng Anh là phiên bản chính ([`ACCESSIBILITY.md` ở root](../../../ACCESSIBILITY.md)). Bản tiếng Việt này có thể chậm cập nhật một vài commit.
**Cập nhật lần cuối:** 2026-11-09
YTDescGen hướng tới việc ai làm video cũng dùng được, kể cả người dùng bàn phím thay chuột, trình đọc màn hình, phóng to hoặc kính lúp, chế độ tương phản cao, điều khiển bằng giọng nói hay màn hình cảm ứng. Văn bản này nói rõ những gì đang hoạt động, cách kiểm tra, những gì chưa ổn, và cách báo cho chúng tôi khi bạn gặp rào cản.
Văn bản áp dụng cho trang web [ytgenerator.stream](https://ytgenerator.stream), ứng dụng desktop (Windows, macOS, Linux) và ứng dụng Android. Các bản này dùng chung một giao diện, nên mọi điều dưới đây áp dụng cho tất cả, trừ khi có nêu tên nền tảng.
## Mục tiêu
Chúng tôi hướng tới [WCAG 2.2](https://www.w3.org/TR/WCAG22/) mức **AA**. Đây là mục tiêu, không phải tuyên bố đã đạt chuẩn: YTDescGen là dự án mã nguồn mở do một người duy trì và chưa được kiểm định độc lập. Khi phát hiện chỗ chưa đạt, chỗ đó sẽ được sửa hoặc ghi vào mục [Hạn chế đã biết](#hạn-chế-đã-biết).
## Những gì đang hoạt động
### Bàn phím
- Mọi trang, menu và hộp thoại đều dùng được chỉ bằng bàn phím. **Chuyển đến nội dung** là điểm dừng đầu tiên trên các trang của ứng dụng, và một đường viền hiện rõ vị trí đang được focus.
- Hộp thoại giữ focus bên trong khi đang mở, đóng bằng **Esc**, rồi trả focus về đúng nút đã mở nó.
- Phím tắt dùng được trên mọi trang:
- **Ctrl/⌘ + K**: command palette (mở trang bất kỳ, sao chép, profile, preset, template, đổi theme và ngôn ngữ).
- **Ctrl/⌘ + G** hoặc **Ctrl/⌘ + Enter**: sang trang Kết quả.
- **Ctrl/⌘ + Shift + C**: Sao chép tất cả.
- **Ctrl/⌘ + S**: lưu vào Lịch sử.
- **Ctrl/⌘ + B**: thu gọn/mở thanh bên.
- **Alt + T**: tới vùng thông báo.
- **Ctrl/⌘ + /** (hoặc **?**): danh sách đầy đủ.
- Phím tắt một phím **?** có thể tắt ở **Cài đặt › Trình soạn › Phím tắt một phím**, dành cho người nhập bằng giọng nói hoặc hay bấm nhầm phím.
### Trình đọc màn hình
- Mọi nút đều có tên, kể cả nút chỉ có biểu tượng, và mọi ô nhập đều có nhãn. Gợi ý và thông báo lỗi được gắn với đúng ô của nó.
- Các xác nhận và lỗi đều được đọc lên ("Đã sao chép!", "Đã lưu vào lịch sử", lý do không sao chép được), các vấn đề của Strict Mode cũng vậy.
- Khi bạn mở trang khác, tên trang được đọc lên. Focus vẫn ở liên kết bạn vừa dùng.
- Mỗi trang có tiêu đề riêng và một tiêu đề chính duy nhất. Ngôn ngữ của trang theo ngôn ngữ giao diện bạn chọn (tám ngôn ngữ).
- Tiêu đề, mô tả và tag được tạo ra đều gắn ngôn ngữ mà chúng được viết, nên mô tả tiếng Nhật được đọc bằng giọng tiếng Nhật kể cả khi giao diện đang là tiếng Việt.
### Thị giác
- Có theme tối và theme sáng, cả hai đều đạt độ tương phản WCAG AA cho chữ (4.5:1) trên mọi nền. Một test giữ cho điều này không bị phá ([tests/styles/contrast.test.ts](../../../tests/styles/contrast.test.ts)).
- Bố cục co giãn từ màn hình rộng xuống bề rộng điện thoại, nên khi phóng to, nội dung dồn thành một cột thay vì tràn ra ngoài màn hình.
- Ứng dụng desktop phóng to/thu nhỏ bằng **Ctrl/⌘ + =** và **Ctrl/⌘ + −** (trên Windows dùng được cả Ctrl + con lăn chuột). Trên Android, dùng hai ngón tay để phóng to.
- Ở chế độ High Contrast của Windows (forced colours), đường viền focus vẫn hiện.
- **Cài đặt › Giao diện › Ẩn thanh cuộn** bỏ các thanh cuộn; vẫn cuộn được bằng bàn phím, con lăn chuột và cảm ứng.
### Chuyển động
- Khi bật **Giảm chuyển động** (Reduce motion) trong hệ điều hành, các hiệu ứng động và cuộn mượt được tắt.
### Cảm ứng
- Trên màn hình cảm ứng, nút và ô nhập lớn lên khoảng 44 px, các nút đóng/bỏ qua nhỏ cũng vậy.
### Trang kiểm tra của website
- Bước kiểm tra Cloudflare Turnstile trước khi vào website thường tự xong. Trạng thái của nó ("Đang kiểm tra trình duyệt…", lỗi) được đọc lên, và dùng được bằng bàn phím. Xem [Hạn chế đã biết](#hạn-chế-đã-biết) nếu Cloudflare yêu cầu bạn giải thử thách.
## Cách kiểm tra
- **Thủ công.** Người duy trì dùng YTDescGen chỉ bằng bàn phím (rút chuột) và bằng Windows Narrator, qua các luồng chính: trình soạn, kết quả, sao chép, profile, preset, template, Lịch sử, Cài đặt và sao lưu.
- **Tự động.** Một unit test kiểm tra độ tương phản của mọi token màu ở cả hai theme.
- **Quy tắc thiết kế.** Các thành phần giao diện dựng từ những khối có sẵn khả năng tiếp cận (Radix primitives). Nút chỉ có biểu tượng không thể tạo ra mà thiếu tên, và mọi ô nhập lấy nhãn và phần nối lỗi từ cùng một component dùng chung.
Ứng dụng **chưa** được thử với NVDA, JAWS, VoiceOver (macOS), TalkBack (Android) hay Orca (Linux). Rất mong nhận được phản hồi từ những ai đang dùng các công cụ này.
## Môi trường hỗ trợ
| Nền tảng | Chạy trên | Trình đọc màn hình |
| --- | --- | --- |
| Windows: ứng dụng desktop, hoặc website trên Edge / Chrome | Windows 10 hoặc 11 với WebView2; Chrome hoặc Edge 111+ | Narrator: đã thử |
| Website trên trình duyệt khác | Firefox 114+, Safari 16.4+ | Chưa thử |
| Ứng dụng desktop macOS | macOS 11 trở lên, Apple silicon | VoiceOver: chưa thử |
| Ứng dụng desktop Linux | WebKitGTK 2.40 trở lên | Orca: chưa thử |
| Ứng dụng Android | Android 11 trở lên, Android System WebView bản mới | TalkBack: chưa thử |
## Hạn chế đã biết
- **Thử thách của Cloudflare trên website.** Nếu Turnstile bắt bạn giải thử thách thay vì tự qua, thử thách đó do Cloudflare quản lý và khả năng tiếp cận của nó do họ sửa. Nếu nó chặn bạn, hãy dùng ứng dụng desktop hoặc Android (không có trang kiểm tra), hoặc [gửi email cho chúng tôi](#báo-một-rào-cản).
- **Viền ô nhập mờ.** Viền của ô nhập trống chỉ khoảng 1.2–1.3:1 so với nền, dưới mức 3:1 mà WCAG yêu cầu. Ô nhập vẫn được nhận biết qua nhãn, và ô đang focus có viền và vầng màu nhấn.
- **Nút Tiếp tục ở màn hình chạy lần đầu** dùng gradient của thương hiệu. Chữ trắng trên đầu màu tím nhạt hơn của gradient chỉ đạt 3.96:1.
- **Bộ đếm ký tự không được đọc lên khi bạn gõ**, vì như vậy sẽ chen ngang mỗi lần gõ phím. Khi một trường vượt giới hạn của YouTube, việc sao chép bị từ chối kèm thông báo lý do, và Strict Mode liệt kê vấn đề trong một banner được đọc lên.
- **Chưa có lint khả năng tiếp cận tự động.** `eslint-plugin-jsx-a11y` chưa hỗ trợ ESLint 10 mà dự án đang dùng, và unit test chạy không có DOM của trình duyệt. Ngoài test độ tương phản, việc kiểm tra là thủ công (xem ở trên).
- **Bản dịch.** Các ngôn ngữ giao diện ngoài tiếng Anh và tiếng Việt được dịch với sự hỗ trợ của AI (xem [Tuyên bố miễn trừ](DISCLAIMER.md)). Một số nhãn có thể nghe không tự nhiên khi được đọc lên.
- **Emoji trong mô tả.** Mô tả được tạo dùng vài emoji làm dấu mục (ví dụ 👍 và 🔔), và trình đọc màn hình trên YouTube sẽ đọc tên của chúng.
## Báo một rào cản
Nếu có điều gì trong YTDescGen cản trở bạn, hãy cho chúng tôi biết. Bạn không cần biết nguyên nhân kỹ thuật.
- **Nên dùng:** mở một [issue về khả năng tiếp cận](https://github.com/poli0981/youtube-generator/issues/new?template=accessibility.yml). Biểu mẫu sẽ hỏi nền tảng, công nghệ hỗ trợ bạn dùng và chuyện gì đã xảy ra.
- **Không muốn đăng công khai?** Gửi email tới **contact@poli0981.dev**, tiêu đề bắt đầu bằng `[Accessibility]`.
- **Câu hỏi nhanh?** Hỏi trên [Discord](https://discord.gg/kDM9GMu5vm).
### Mức độ nghiêm trọng
| Mức | Ý nghĩa |
| --- | --- |
| **Critical** | Bạn không làm xong được việc chính: soạn, tạo, sao chép, lưu, hoặc qua được bước kiểm tra của website. |
| **High** | Bạn làm xong được, nhưng rất vất vả hoặc phải dùng cách vòng. |
| **Medium** | Vẫn dùng được, nhưng thất thường hoặc khó hiểu. |
| **Low** | Phiền nhỏ, không cản bạn. |
### Cách chúng tôi phản hồi
- Chúng tôi trả lời trong vòng **7 ngày** và tin vào những gì bạn báo.
- Rào cản **Critical** được sửa trong bản vá kế tiếp. Các mức khác được lên kế hoạch như mọi lỗi khác, mức nặng hơn làm trước.
- Nếu có cách tạm thời, chúng tôi sẽ cho bạn biết trong lúc chờ bản sửa.
- Khi bản sửa ra, chúng tôi sẽ nhờ bạn kiểm tra lại nếu bạn sẵn lòng.
Đây là dự án một người làm, nên các mốc thời gian là ước tính thật lòng, không phải cam kết. Nếu trễ, chúng tôi sẽ nói rõ trong issue.
## Dành cho người đóng góp
Thay đổi giao diện cần giữ đúng mọi điều ở trên. Trước khi mở pull request có đụng tới UI:
- **Bàn phím.** Mọi thứ dùng được bằng bàn phím: thứ tự focus hợp lý, đường viền focus hiện rõ, **Esc** đóng thứ bạn vừa mở, và không có chỗ nào giữ chặt focus.
- **Tên gọi.** Dùng các component dùng chung `Field` (nối nhãn, gợi ý và lỗi) và `IconButton` (không thể render nếu thiếu `label`). Chữ trong `aria-label` đi qua `t()` như mọi chuỗi khác, đủ tám locale.
- **Lỗi và trạng thái.** Phải được đọc lên: `Banner` với `alert`, một toast, hoặc một live region có sẵn.
- **Màu sắc.** Màu không bao giờ là tín hiệu duy nhất. Chỉ dùng token thiết kế, và chạy `npm run test:run`. Test độ tương phản sẽ báo lỗi nếu một token tụt dưới AA, và chữ trắng phải nằm trên các nền `*-solid`.
- **Chuyển động.** Hiệu ứng mới phải tôn trọng giảm chuyển động. Các component của Motion đã làm sẵn, và animation CSS được quy tắc chung trong `globals.css` xử lý.
- **Kích thước.** Mọi thứ bấm được tối thiểu 24 × 24 px và lớn lên trên màn hình cảm ứng.
- **Trình đọc màn hình.** Thử thay đổi một lần bằng trình đọc màn hình: Narrator (Win + Ctrl + Enter), VoiceOver (⌘ + F5), NVDA hoặc Orca.
Mẫu pull request có cùng danh sách kiểm tra này.
## Góp ý cho văn bản này
Mọi ý tưởng để cải thiện văn bản này hay cách xử lý khả năng tiếp cận đều được hoan nghênh trên [GitHub Discussions](https://github.com/poli0981/youtube-generator/discussions). Còn rào cản thì hãy báo qua [quy trình báo lỗi](#báo-một-rào-cản) để được theo dõi.
+1
View File
@@ -248,3 +248,4 @@ docs/I18N.md). Lời khuyên restart ở trên vẫn áp dụng cho tất cả.
- [PACKAGING.md](../../PACKAGING.md) — Tauri release build và signing.
- [CONTRIBUTING.md ở root](../../../CONTRIBUTING.md) — quy trình PR, quy ước commit, auto-ignore rules.
- [SECURITY.md ở root](../../../SECURITY.md) — báo cáo lỗ hổng bảo mật.
- [ACCESSIBILITY.md ở root](../../../ACCESSIBILITY.md) — những gì dùng được với công nghệ hỗ trợ, và checklist cho thay đổi UI (bản tiếng Việt: [ACCESSIBILITY.md](./ACCESSIBILITY.md)).
+8
View File
@@ -20,6 +20,7 @@ export type LegalDocId =
| "license"
| "third-party"
| "security"
| "accessibility"
| "notice"
| "conduct";
@@ -54,6 +55,13 @@ export const LEGAL_DOCS: readonly LegalDoc[] = [
consent: false,
},
{ id: "security", labelKey: "legal.docs.security", source: "SECURITY.md", consent: false },
{
id: "accessibility",
labelKey: "legal.docs.accessibility",
source: "ACCESSIBILITY.md",
sourceVi: "docs/i18n/vi/ACCESSIBILITY.md",
consent: false,
},
{ id: "notice", labelKey: "legal.docs.notice", source: "NOTICE", consent: false },
{ id: "conduct", labelKey: "legal.docs.conduct", source: "CODE_OF_CONDUCT.md", consent: false },
];
+2 -2
View File
@@ -1079,7 +1079,7 @@
"disclaimer",
"license",
"thirdParty",
"security",
"security", "accessibility",
"notice",
"conduct"
],
@@ -1089,7 +1089,7 @@
"disclaimer",
"license",
"thirdParty",
"security",
"security", "accessibility",
"notice",
"conduct"
],
+3 -1
View File
@@ -1337,7 +1337,7 @@
},
"legal": {
"title": "Legal",
"intro": "Terms, privacy, licensing and security for YTDescGen — the same documents published at ytgenerator.stream/legal.",
"intro": "Terms, privacy, licensing, security and accessibility for YTDescGen — the same documents published at ytgenerator.stream/legal.",
"englishOnly": "Documents are published in English; the Disclaimer also has a Vietnamese version.",
"back": "Back",
"allDocuments": "All documents",
@@ -1351,6 +1351,7 @@
"license": "License (Apache-2.0)",
"thirdParty": "Third-party notices",
"security": "Security policy",
"accessibility": "Accessibility",
"notice": "NOTICE",
"conduct": "Code of Conduct"
},
@@ -1361,6 +1362,7 @@
"license": "The Apache License 2.0 the source code is released under.",
"thirdParty": "Open-source libraries, fonts and services YTDescGen relies on.",
"security": "How to report a vulnerability privately, and what is in scope.",
"accessibility": "What works with a keyboard, screen readers and zoom, known gaps, and how to report a barrier.",
"notice": "The Apache-2.0 NOTICE file with copyright and attribution.",
"conduct": "Contributor Covenant rules for the project's community spaces."
}
+3 -1
View File
@@ -1337,7 +1337,7 @@
},
"legal": {
"title": "Información legal",
"intro": "Términos, privacidad, licencias y seguridad de YTDescGen: los mismos documentos publicados en ytgenerator.stream/legal.",
"intro": "Términos, privacidad, licencias, seguridad y accesibilidad de YTDescGen: los mismos documentos publicados en ytgenerator.stream/legal.",
"englishOnly": "Los documentos se publican en inglés; el Descargo de responsabilidad también tiene versión en vietnamita.",
"back": "Volver",
"allDocuments": "Todos los documentos",
@@ -1351,6 +1351,7 @@
"license": "Licencia (Apache-2.0)",
"thirdParty": "Avisos de terceros",
"security": "Política de seguridad",
"accessibility": "Accesibilidad",
"notice": "NOTICE",
"conduct": "Código de conducta"
},
@@ -1361,6 +1362,7 @@
"license": "La Licencia Apache 2.0 bajo la que se publica el código fuente.",
"thirdParty": "Bibliotecas de código abierto, fuentes y servicios en los que se basa YTDescGen.",
"security": "Cómo informar de una vulnerabilidad en privado y qué está dentro del alcance.",
"accessibility": "Qué funciona con teclado, lectores de pantalla y zoom, limitaciones conocidas y cómo informar de una barrera.",
"notice": "El archivo NOTICE de Apache-2.0 con derechos de autor y atribución.",
"conduct": "Normas del Contributor Covenant para los espacios comunitarios del proyecto."
}
+3 -1
View File
@@ -1337,7 +1337,7 @@
},
"legal": {
"title": "Informasi hukum",
"intro": "Ketentuan, privasi, lisensi, dan keamanan YTDescGen — dokumen yang sama dengan yang diterbitkan di ytgenerator.stream/legal.",
"intro": "Ketentuan, privasi, lisensi, keamanan, dan aksesibilitas YTDescGen — dokumen yang sama dengan yang diterbitkan di ytgenerator.stream/legal.",
"englishOnly": "Dokumen diterbitkan dalam bahasa Inggris; Penafian juga tersedia dalam bahasa Vietnam.",
"back": "Kembali",
"allDocuments": "Semua dokumen",
@@ -1351,6 +1351,7 @@
"license": "Lisensi (Apache-2.0)",
"thirdParty": "Pemberitahuan pihak ketiga",
"security": "Kebijakan keamanan",
"accessibility": "Aksesibilitas",
"notice": "NOTICE",
"conduct": "Kode Etik"
},
@@ -1361,6 +1362,7 @@
"license": "Lisensi Apache 2.0 yang berlaku untuk kode sumber.",
"thirdParty": "Pustaka sumber terbuka, font, dan layanan yang digunakan YTDescGen.",
"security": "Cara melaporkan kerentanan secara pribadi, dan cakupannya.",
"accessibility": "Apa yang bisa dipakai dengan keyboard, pembaca layar, dan zoom, keterbatasan yang diketahui, dan cara melaporkan hambatan.",
"notice": "Berkas NOTICE Apache-2.0 berisi hak cipta dan atribusi.",
"conduct": "Aturan Contributor Covenant untuk ruang komunitas proyek."
}
+3 -1
View File
@@ -1337,7 +1337,7 @@
},
"legal": {
"title": "法的情報",
"intro": "YTDescGen の利用規約、プライバシー、ライセンス、セキュリティ。ytgenerator.stream/legal で公開しているものと同じ文書です。",
"intro": "YTDescGen の利用規約、プライバシー、ライセンス、セキュリティ、アクセシビリティ。ytgenerator.stream/legal で公開しているものと同じ文書です。",
"englishOnly": "文書は英語で公開しています(免責事項のみベトナム語版もあります)。",
"back": "戻る",
"allDocuments": "すべての文書",
@@ -1351,6 +1351,7 @@
"license": "ライセンス(Apache-2.0)",
"thirdParty": "サードパーティ通知",
"security": "セキュリティポリシー",
"accessibility": "アクセシビリティ",
"notice": "NOTICE",
"conduct": "行動規範"
},
@@ -1361,6 +1362,7 @@
"license": "ソースコードに適用される Apache License 2.0。",
"thirdParty": "YTDescGen が利用しているオープンソースライブラリ、フォント、サービス。",
"security": "脆弱性を非公開で報告する方法と対象範囲。",
"accessibility": "キーボード・スクリーンリーダー・拡大表示で使える機能、既知の制限、利用上の障壁を報告する方法。",
"notice": "著作権と帰属を記した Apache-2.0 の NOTICE ファイル。",
"conduct": "プロジェクトのコミュニティに適用される Contributor Covenant の規則。"
}
+3 -1
View File
@@ -1337,7 +1337,7 @@
},
"legal": {
"title": "법적 고지",
"intro": "YTDescGen의 약관, 개인정보, 라이선스, 보안 문서입니다. ytgenerator.stream/legal에 게시된 것과 같은 내용입니다.",
"intro": "YTDescGen의 약관, 개인정보, 라이선스, 보안, 접근성 문서입니다. ytgenerator.stream/legal에 게시된 것과 같은 내용입니다.",
"englishOnly": "문서는 영어로 게시됩니다. 면책 조항은 베트남어 버전도 있습니다.",
"back": "뒤로",
"allDocuments": "모든 문서",
@@ -1351,6 +1351,7 @@
"license": "라이선스(Apache-2.0)",
"thirdParty": "타사 고지",
"security": "보안 정책",
"accessibility": "접근성",
"notice": "NOTICE",
"conduct": "행동 강령"
},
@@ -1361,6 +1362,7 @@
"license": "소스 코드에 적용되는 Apache License 2.0.",
"thirdParty": "YTDescGen이 사용하는 오픈 소스 라이브러리, 글꼴, 서비스.",
"security": "취약점을 비공개로 제보하는 방법과 적용 범위.",
"accessibility": "키보드, 화면 낭독기, 확대 기능으로 쓸 수 있는 것, 알려진 제한 사항, 접근성 문제를 알리는 방법.",
"notice": "저작권과 출처 표시를 담은 Apache-2.0 NOTICE 파일.",
"conduct": "프로젝트 커뮤니티 공간에 적용되는 Contributor Covenant 규칙."
}
+3 -1
View File
@@ -1337,7 +1337,7 @@
},
"legal": {
"title": "Informações legais",
"intro": "Termos, privacidade, licenças e segurança do YTDescGen — os mesmos documentos publicados em ytgenerator.stream/legal.",
"intro": "Termos, privacidade, licenças, segurança e acessibilidade do YTDescGen — os mesmos documentos publicados em ytgenerator.stream/legal.",
"englishOnly": "Os documentos são publicados em inglês; o Aviso de isenção também tem versão em vietnamita.",
"back": "Voltar",
"allDocuments": "Todos os documentos",
@@ -1351,6 +1351,7 @@
"license": "Licença (Apache-2.0)",
"thirdParty": "Avisos de terceiros",
"security": "Política de segurança",
"accessibility": "Acessibilidade",
"notice": "NOTICE",
"conduct": "Código de Conduta"
},
@@ -1361,6 +1362,7 @@
"license": "A Licença Apache 2.0 sob a qual o código-fonte é publicado.",
"thirdParty": "Bibliotecas de código aberto, fontes e serviços usados pelo YTDescGen.",
"security": "Como relatar uma vulnerabilidade de forma privada e o que está no escopo.",
"accessibility": "O que funciona com teclado, leitores de tela e zoom, limitações conhecidas e como relatar uma barreira.",
"notice": "O arquivo NOTICE da Apache-2.0 com direitos autorais e atribuição.",
"conduct": "Regras do Contributor Covenant para os espaços da comunidade do projeto."
}
+3 -1
View File
@@ -1337,7 +1337,7 @@
},
"legal": {
"title": "Pháp lý",
"intro": "Điều khoản, quyền riêng tư, giấy phép và bảo mật của YTDescGen — cùng nội dung được đăng tại ytgenerator.stream/legal.",
"intro": "Điều khoản, quyền riêng tư, giấy phép, bảo mật và khả năng tiếp cận của YTDescGen — cùng nội dung được đăng tại ytgenerator.stream/legal.",
"englishOnly": "Các văn bản được công bố bằng tiếng Anh; riêng Tuyên bố miễn trừ có thêm bản tiếng Việt.",
"back": "Quay lại",
"allDocuments": "Tất cả văn bản",
@@ -1351,6 +1351,7 @@
"license": "Giấy phép (Apache-2.0)",
"thirdParty": "Thông báo bên thứ ba",
"security": "Chính sách bảo mật",
"accessibility": "Khả năng tiếp cận",
"notice": "NOTICE",
"conduct": "Quy tắc ứng xử"
},
@@ -1361,6 +1362,7 @@
"license": "Giấy phép Apache 2.0 áp dụng cho mã nguồn.",
"thirdParty": "Thư viện mã nguồn mở, phông chữ và dịch vụ mà YTDescGen sử dụng.",
"security": "Cách báo cáo lỗ hổng một cách riêng tư và phạm vi áp dụng.",
"accessibility": "Những gì dùng được với bàn phím, trình đọc màn hình và phóng to, các hạn chế đã biết, và cách báo một rào cản.",
"notice": "Tệp NOTICE theo Apache-2.0 với thông tin bản quyền và ghi công.",
"conduct": "Quy tắc Contributor Covenant cho các không gian cộng đồng của dự án."
}
+3 -1
View File
@@ -1337,7 +1337,7 @@
},
"legal": {
"title": "法律信息",
"intro": "YTDescGen 的条款、隐私、许可与安全文档——与 ytgenerator.stream/legal 上发布的内容相同。",
"intro": "YTDescGen 的条款、隐私、许可、安全与无障碍文档——与 ytgenerator.stream/legal 上发布的内容相同。",
"englishOnly": "文档以英文发布;免责声明另有越南语版本。",
"back": "返回",
"allDocuments": "全部文档",
@@ -1351,6 +1351,7 @@
"license": "许可证(Apache-2.0)",
"thirdParty": "第三方声明",
"security": "安全政策",
"accessibility": "无障碍",
"notice": "NOTICE",
"conduct": "行为准则"
},
@@ -1361,6 +1362,7 @@
"license": "源代码所采用的 Apache License 2.0。",
"thirdParty": "YTDescGen 所依赖的开源库、字体和服务。",
"security": "如何私下报告漏洞,以及适用范围。",
"accessibility": "键盘、屏幕阅读器和缩放下可用的功能、已知限制,以及如何报告无障碍问题。",
"notice": "包含版权与署名信息的 Apache-2.0 NOTICE 文件。",
"conduct": "适用于项目社区空间的 Contributor Covenant 规则。"
}
+13
View File
@@ -74,6 +74,19 @@ describe("renderAllLegalDocs (the real repository files)", () => {
expect(docs.disclaimer.html.vi).toBeTruthy();
});
it("carries the accessibility statement in English and Vietnamese, dated", () => {
expect(docs.accessibility.title).toBe("Accessibility");
expect(docs.accessibility.effective).toMatch(/^\d{4}-\d{2}-\d{2}$/);
expect(docs.accessibility.html.vi).toContain("Khả năng tiếp cận");
// The in-page links resolve: every #anchor the statement uses has a heading.
for (const lang of ["en", "vi"] as const) {
const html = docs.accessibility.html[lang] ?? "";
for (const [, anchor] of html.matchAll(/href="#([^"]+)"/g)) {
expect(html, `${lang} #${anchor}`).toContain(`id="${anchor}"`);
}
}
});
it("dates the Terms and the Privacy Policy", () => {
expect(docs.terms.effective).toMatch(/^\d{4}-\d{2}-\d{2}$/);
expect(docs.privacy.effective).toMatch(/^\d{4}-\d{2}-\d{2}$/);
+10
View File
@@ -65,6 +65,16 @@ describe("renderGatePage", () => {
expect(html).toContain("for 24 hours");
});
it("links the policies and the accessibility statement in the footer, in the visitor's language", () => {
const footer = (lang: "en" | "vi") =>
/<footer>(.*)<\/footer>/.exec(renderGatePage({ ...base, lang }))?.[1] ?? "";
expect(footer("en")).toContain('href="/legal/security"');
expect(footer("en")).toContain(
'<a href="/legal/accessibility" target="_blank" rel="noopener">Accessibility</a>',
);
expect(footer("vi")).toContain(">Khả năng tiếp cận</a>");
});
it("puts the configuration in a JSON block that cannot close its <script>", () => {
const html = renderGatePage({ ...base, siteKey: "</script><script>alert(1)</script>" });
const block = /<script id="ytg-gate" type="application\/json">([^<]*)<\/script>/.exec(html);
+10
View File
@@ -26,6 +26,8 @@ export interface GateStrings {
dataNote: string;
protectedBy: string;
security: string;
/** Footer link to the accessibility statement. */
accessibility: string;
}
export const GATE_STRINGS: Readonly<Record<GateLang, GateStrings>> = {
@@ -50,6 +52,7 @@ export const GATE_STRINGS: Readonly<Record<GateLang, GateStrings>> = {
"Cloudflare Turnstile processes technical signals (such as your IP address and browser details) to run this check. YTDescGen only keeps a signed cookie that remembers you passed, for {hours} hours.",
protectedBy: "Protected by Cloudflare Turnstile",
security: "Security",
accessibility: "Accessibility",
},
vi: {
title: "Kiểm tra nhanh — YTDescGen",
@@ -72,6 +75,7 @@ export const GATE_STRINGS: Readonly<Record<GateLang, GateStrings>> = {
"Cloudflare Turnstile xử lý một số tín hiệu kỹ thuật (như địa chỉ IP và thông tin trình duyệt) để chạy bước kiểm tra. YTDescGen chỉ lưu một cookie đã ký để ghi nhớ bạn đã qua kiểm tra trong {hours} giờ.",
protectedBy: "Được bảo vệ bởi Cloudflare Turnstile",
security: "Bảo mật",
accessibility: "Khả năng tiếp cận",
},
ja: {
title: "確認 — YTDescGen",
@@ -94,6 +98,7 @@ export const GATE_STRINGS: Readonly<Record<GateLang, GateStrings>> = {
"Cloudflare Turnstile は確認のために技術的な情報(IP アドレスやブラウザ情報など)を処理します。YTDescGen が保存するのは、確認済みであることを{hours}時間記憶する署名付き Cookie だけです。",
protectedBy: "Cloudflare Turnstile による保護",
security: "セキュリティ",
accessibility: "アクセシビリティ",
},
es: {
title: "Comprobación rápida — YTDescGen",
@@ -116,6 +121,7 @@ export const GATE_STRINGS: Readonly<Record<GateLang, GateStrings>> = {
"Cloudflare Turnstile procesa señales técnicas (como tu dirección IP y datos del navegador) para realizar esta comprobación. YTDescGen solo guarda una cookie firmada que recuerda que la superaste durante {hours} horas.",
protectedBy: "Protegido por Cloudflare Turnstile",
security: "Seguridad",
accessibility: "Accesibilidad",
},
ko: {
title: "빠른 확인 — YTDescGen",
@@ -138,6 +144,7 @@ export const GATE_STRINGS: Readonly<Record<GateLang, GateStrings>> = {
"Cloudflare Turnstile은 확인을 위해 기술적 신호(IP 주소, 브라우저 정보 등)를 처리합니다. YTDescGen은 확인을 통과했음을 {hours}시간 동안 기억하는 서명된 쿠키만 저장합니다.",
protectedBy: "Cloudflare Turnstile로 보호됨",
security: "보안",
accessibility: "접근성",
},
zh: {
title: "快速验证 — YTDescGen",
@@ -159,6 +166,7 @@ export const GATE_STRINGS: Readonly<Record<GateLang, GateStrings>> = {
"Cloudflare Turnstile 会处理一些技术信号(例如 IP 地址和浏览器信息)来完成验证。YTDescGen 只会保存一个签名 Cookie,用于在 {hours} 小时内记住你已通过验证。",
protectedBy: "由 Cloudflare Turnstile 保护",
security: "安全",
accessibility: "无障碍",
},
"pt-BR": {
title: "Verificação rápida — YTDescGen",
@@ -181,6 +189,7 @@ export const GATE_STRINGS: Readonly<Record<GateLang, GateStrings>> = {
"O Cloudflare Turnstile processa sinais técnicos (como seu endereço IP e dados do navegador) para fazer esta verificação. O YTDescGen guarda apenas um cookie assinado que lembra que você passou, por {hours} horas.",
protectedBy: "Protegido pelo Cloudflare Turnstile",
security: "Segurança",
accessibility: "Acessibilidade",
},
id: {
title: "Pemeriksaan singkat — YTDescGen",
@@ -203,6 +212,7 @@ export const GATE_STRINGS: Readonly<Record<GateLang, GateStrings>> = {
"Cloudflare Turnstile memproses sinyal teknis (seperti alamat IP dan detail browser) untuk menjalankan pemeriksaan ini. YTDescGen hanya menyimpan cookie bertanda tangan yang mengingat bahwa Anda lolos, selama {hours} jam.",
protectedBy: "Dilindungi oleh Cloudflare Turnstile",
security: "Keamanan",
accessibility: "Aksesibilitas",
},
};
+1 -1
View File
@@ -200,7 +200,7 @@ ${consentBlock}
<noscript><p class="status err">${escapeHtml(t.noscript)}</p></noscript>
<p class="note">${dataNote}</p>
</main>
<footer>${escapeHtml(t.protectedBy)} · ${link(legalDocPath("privacy"), t.privacyLink)} · ${link(legalDocPath("terms"), t.termsLink)} · ${link(legalDocPath("security"), t.security)}</footer>
<footer>${escapeHtml(t.protectedBy)} · ${link(legalDocPath("privacy"), t.privacyLink)} · ${link(legalDocPath("terms"), t.termsLink)} · ${link(legalDocPath("security"), t.security)} · ${link(legalDocPath("accessibility"), t.accessibility)}</footer>
<script id="ytg-gate" type="application/json">${scriptJson(config)}</script>
<script nonce="${options.nonce}">${CLIENT_SCRIPT}</script>
</body>