Skip to content

release: v2.30.1 — Hide Images decorative fixes & Google Translate default adapter - #203

Merged
prabothcharith merged 3 commits into
mainfrom
development
Nov 18, 2026
Merged

prabothcharith merged 3 commits into
mainfrom
development

Conversation

@prabothcharith

Copy link
Copy Markdown
Owner

Releases \�ccessibility-plugin-react@2.30.1\ following PR #202 and resolves issue #201 (sub-issue of #8).

Highlights

  • Hide Images inside <figure>\ & explicit decorative markers (\src/core/effects.ts):
    • Removed generic [role='figure']\ / \ igure\ blanket protection from \isFunctionalOrMeaningfulImage.
    • Evaluates explicit decorative markers (\data-decorative, .decorative, .deco,
      ole='presentation'|'none', \�ria-hidden='true', including parent <picture>) before non-empty \�lt/\�ria-label/\ itle\ checks.
    • Guards \data-decorative='false'\ and expands \hideVideos\ to [data-video], .video-placeholder.
  • Google Translate Adapter (\src/core/translationAdapter.ts, \src/features/TranslationController.tsx, \src/index.ts):
    • Exports \createGoogleTranslateAdapter\ and \GoogleTranslateAdapterOptions, and sets Google Translate as the default \TranslationController\ provider across 14 target languages.
    • Replaces broken [TR]\ partial-word output with full sentence translation via \https://translate.googleapis.com/translate_a/single\, preserves leading/trailing whitespace, deduplicates requests via \Map\ cache, and falls back cleanly without [TR]\ prefix on network/HTTP failure unless \ allbackToOffline: false.
  • Documentation & CSP: Updated \CHANGELOG.md, \docs/TRANSLATION.md, \docs/API.md, \docs/CSP.md, and \�xamples/next-app/next.config.mjs.

Verification


  • pm run format:check\ &
    pm run validate\ (\ sc --noEmit, \ sc --noEmit -p tsconfig.tests.json, ESLint, 51 unit/integration files / 521 tests, tsup + CSS build): passed

  • pm run pack:check\ &
    pm run test:consumers\ (ESM+SSR, CJS, React 18 Vite, React 19 Tailwind, Next.js 16): passed
  • Playwright Chromium / Tailwind / Next.js / WebKit / Mobile (\212\ passed, \8\ skipped) and Firefox (\42\ passed, \2\ skipped): passed

Release Publishing

Merging this PR into \main\ updates \package.json\ to \2.30.1, triggering .github/workflows/publish.yml\ via npm OIDC.

…e-translate

fix: respect decorative markers for hide images and default to Google Translate adapter (#201)
Copilot AI balanced review requested due to automatic review settings November 18, 2026 02:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T03:00:52.053775Z e0c3b33 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e0c3b3358f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +946 to +949
cache.set(
cacheKey,
translateOfflineText(textKey, request.targetLanguage),
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Add a usable offline fallback for the new target languages

When the network request fails for ar, hi, pt, ru, ko, it, or nl, the offline helper has no lexicon for that language and returns the input unchanged; this branch caches that text as a successful translation, so the widget still reports the page translated. Add offline support for these targets or signal that fallback is unavailable instead of silently returning untranslated content.

AGENTS.md reference: AGENTS.md:L10-L10

Useful? React with 👍 / 👎.

Comment thread src/core/effects.ts
Comment on lines +1834 to +1836
record.target.matches(
"img, picture, video, [data-video], .video-placeholder, iframe",
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reapply hiding when video markers change

If hideVideos is active and a page script later adds data-video or .video-placeholder to an existing element, this observer queues it, but applyIncremental skips elements already processed in the initial pass. The marker therefore never causes the element to be hidden; reapply the effect to changed elements or trigger a refresh.

AGENTS.md reference: AGENTS.md:L12-L12

Useful? React with 👍 / 👎.

@prabothcharith
prabothcharith merged commit cd67cd5 into main Nov 18, 2026
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants