fix(theme): Add translate no to heading anchors and blog authors (#11360)
Some checks failed
Argos CI / take-screenshots (push) Has been cancelled
Build Hash Router / Build Hash Router (push) Has been cancelled
Canary Release / Publish Canary (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Continuous Releases / Continuous Releases (push) Has been cancelled
E2E Tests / E2E — Yarn v1 (18.0) (push) Has been cancelled
E2E Tests / E2E — Yarn v1 (20) (push) Has been cancelled
E2E Tests / E2E — Yarn v1 (22) (push) Has been cancelled
E2E Tests / E2E — Yarn v1 (24) (push) Has been cancelled
E2E Tests / E2E — Yarn v1 Windows (push) Has been cancelled
E2E Tests / E2E — Yarn Berry (node-modules, -s) (push) Has been cancelled
E2E Tests / E2E — Yarn Berry (node-modules, -st) (push) Has been cancelled
E2E Tests / E2E — Yarn Berry (pnp, -s) (push) Has been cancelled
E2E Tests / E2E — Yarn Berry (pnp, -st) (push) Has been cancelled
E2E Tests / E2E — npm (push) Has been cancelled
E2E Tests / E2E — pnpm (push) Has been cancelled

This commit is contained in:
Sébastien Lorber 2025-08-04 13:30:35 +02:00 committed by GitHub
parent b1391349f5
commit 27945b3b34
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 3 deletions

View File

@ -30,10 +30,14 @@ function AuthorTitle({title}: {title: string}) {
function AuthorName({name, as}: {name: string; as: Props['as']}) {
if (!as) {
return <span className={styles.authorName}>{name}</span>;
return (
<span className={styles.authorName} translate="no">
{name}
</span>
);
} else {
return (
<Heading as={as} className={styles.authorName}>
<Heading as={as} className={styles.authorName} translate="no">
{name}
</Heading>
);

View File

@ -54,7 +54,8 @@ export default function Heading({as: As, id, ...props}: Props): ReactNode {
className="hash-link"
to={`#${id}`}
aria-label={anchorTitle}
title={anchorTitle}>
title={anchorTitle}
translate="no">
&#8203;
</Link>
</As>