<title> — SVG アクセシブル名要素

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2020.

<title> 要素は、SVG のコンテナー要素またはグラフィック要素のアクセシブルな短いテキストの説明を提供します。

<title> 要素内のテキストはグラフィックの一部としてレンダリングされませんが、ブラウザーは通常ツールチップとして表示します。要素が可視テキストで記述されている場合、 <title> 要素を使用するのではなく、 aria-labelledby 属性でそのテキストを参照することが推奨されます。

メモ: SVG 1.1 との後方互換性のため、 <title> 要素は親の最初の子要素であるべきです。

html
<svg viewBox="0 0 20 10" xmlns="http://www.w3.org/2000/svg">
  <circle cx="5" cy="5" r="4">
    <title>これは円です</title>
  </circle>

  <rect x="11" y="1" width="8" height="8">
    <title>これは四角形です</title>
  </rect>
</svg>

属性

この要素はグローバル属性のみがあります。

使用コンテキスト

カテゴリー説明的要素
許可されている内容あらゆる要素や文字データ

仕様書

Specification
Scalable Vector Graphics (SVG) 2
# TitleElement

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
title
Tooltip display

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support

関連情報