Skip to content

Commit 39d1ca6

Browse files
kuvanov-2claude
andcommitted
docs: TextLinkを使用する理由をコメントで説明
- HelpLinkではなくTextLinkを使用する理由を明記 - rel="help"の定義とリリースノートリンクの性質の違いを説明 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent cfe2f14 commit 39d1ca6

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

packages/smarthr-ui/src/components/AppHeader/components/desktop/ReleaseNotesDropdown.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@ const LoadErrorText = memo<PropsWithChildren>(({ children }) => (
100100
</div>
101101
))
102102

103+
// HelpLinkではなくTextLinkを使用する理由:
104+
// - リリースノートは典型的なヘルプコンテンツではない
105+
// - rel="help"はW3C定義で「親要素とその子要素のための追加のヘルプ情報」を指すが、
106+
// AppHeaderからのリリースノートは現在のページと直接関連するとは限らない
107+
// 参考: https://www.w3.org/TR/2010/WD-html5-20100624/links.html#link-type-help
103108
const ArticleLink = memo<PropsWithChildren<{ href: string }>>(({ href, children }) => (
104109
<div className="shr-border-b-shorthand shr-border-dashed shr-p-0.75">
105110
<TextLink

packages/smarthr-ui/src/components/AppHeader/components/mobile/ReleaseNote.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ export const ReleaseNote = memo(() => {
3030
return releaseNote ? <ActualReleaseNote data={releaseNote} /> : null
3131
})
3232

33+
// HelpLinkではなく<a>タグ(TextLinkに相当)を使用する理由:
34+
// - リリースノートは典型的なヘルプコンテンツではない
35+
// - rel="help"はW3C定義で「親要素とその子要素のための追加のヘルプ情報」を指すが、
36+
// AppHeaderからのリリースノートは現在のページと直接関連するとは限らない
37+
// 参考: https://www.w3.org/TR/2010/WD-html5-20100624/links.html#link-type-help
3338
const ActualReleaseNote: FC<{
3439
data: Exclude<Required<HeaderProps>['releaseNote'], null>
3540
}> = ({ data }) => {

0 commit comments

Comments
 (0)