diff --git a/src/core/AccessibilityList.tsx b/src/core/AccessibilityList.tsx index 3f117a1..e18e6a4 100644 --- a/src/core/AccessibilityList.tsx +++ b/src/core/AccessibilityList.tsx @@ -156,6 +156,27 @@ function Panel({ )} +
+ + {strings.creditsPrefix ?? "Designed and developed by"}{" "} + + {strings.creditsName ?? "Praboth"} + ({strings.openInNewTab}) + + + + {strings.documentationLink ?? "Official documentation"} + ({strings.openInNewTab}) + +
); } diff --git a/src/core/i18n/en.ts b/src/core/i18n/en.ts index b97ba31..48773ac 100644 --- a/src/core/i18n/en.ts +++ b/src/core/i18n/en.ts @@ -11,6 +11,9 @@ export const enLocale: Readonly = Object.freeze({ resetAll: "Reset All", statementLink: "Accessibility Statement", openInNewTab: "opens in a new tab", + creditsPrefix: "Designed and developed by", + creditsName: "Praboth", + documentationLink: "Official documentation", buttonTitle: "Accessibility", dragHelp: "Drag to move, or use Alt and arrow keys. The Move button menu offers click and keyboard controls.", diff --git a/src/core/i18n/types.ts b/src/core/i18n/types.ts index 49171a6..5f5da75 100644 --- a/src/core/i18n/types.ts +++ b/src/core/i18n/types.ts @@ -9,6 +9,9 @@ export interface LocaleStrings { resetAll: string; statementLink: string; openInNewTab: string; + creditsPrefix?: string; + creditsName?: string; + documentationLink?: string; buttonTitle: string; dragHelp: string; positionLabel: string; diff --git a/src/styles/tailwind.css b/src/styles/tailwind.css index 027b668..8ceb33a 100644 --- a/src/styles/tailwind.css +++ b/src/styles/tailwind.css @@ -619,6 +619,29 @@ outline: 3px solid var(--arap-accent); outline-offset: 2px; } +.arap-credits { + display: flex; + flex: none; + flex-direction: column; + gap: 2px; + padding-top: 8px; + color: var(--arap-muted); + text-align: center; + font-size: 11px; + line-height: 1.4; +} +.arap-credits a { + color: var(--arap-accent); + text-decoration: underline; + text-underline-offset: 2px; +} +.arap-credits a:hover { + color: var(--arap-accent-hover); +} +.arap-credits a:focus-visible { + outline: 2px solid var(--arap-accent); + outline-offset: 2px; +} /* Oversized / Large controls mode (W-21) */ .arap-root .arap-btn[data-large-controls="true"] { diff --git a/tests/statementAndLargeControls.test.tsx b/tests/statementAndLargeControls.test.tsx index f0fa62d..8aacdb9 100644 --- a/tests/statementAndLargeControls.test.tsx +++ b/tests/statementAndLargeControls.test.tsx @@ -14,6 +14,32 @@ afterEach(() => { }); describe("Accessibility Statement link and oversized controls", () => { + it("shows permanent credits and documentation links", () => { + render( + + + + , + ); + + fireEvent.click(screen.getByRole("button", { name: "Accessibility" })); + + const prabothLink = screen.getByRole("link", { name: /Praboth/ }); + expect(prabothLink).toHaveAttribute("href", "https://www.praboth.com"); + expect(prabothLink).toHaveAttribute("target", "_blank"); + expect(prabothLink).toHaveAttribute("rel", "noopener noreferrer"); + + const documentationLink = screen.getByRole("link", { + name: /Official documentation/, + }); + expect(documentationLink).toHaveAttribute( + "href", + "https://www.praboth.com/accessibility-plugin-react", + ); + expect(documentationLink).toHaveAttribute("target", "_blank"); + expect(documentationLink).toHaveAttribute("rel", "noopener noreferrer"); + }); + it("renders statementUrl when provided", () => { render(