<desc>

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.

<desc> 要素は SVG のコンテナー要素またはグラフィック要素のアクセシブルな長文の説明を提供します。

<desc> 要素内のテキストはグラフィックの一部としてレンダリングされません。要素が可視テキストで記述できる場合、 aria-describedby 属性でそのテキストを参照することが可能です。 aria-describedby を使用する場合、 <desc> よりも優先されます。

<desc> 要素の隠しテキストは、 aria-describedby 値で複数の ID を使用して、他の要素の可視テキストと連結することもできます。その場合、 <desc> 要素は参照するための ID を提供しなければなりません。

html
<svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg">
  <circle cx="5" cy="5" r="4">
    <desc>
      これは円であり、その記述はこれがどのように記述できるかを示すためにここにあるのですが、このような単純な円を記述することが実に必要なのでしょうか?
    </desc>
  </circle>
</svg>

属性

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

使用コンテキスト

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

仕様書

Specification
Scalable Vector Graphics (SVG) 2
# DescriptionAndTitleElements

ブラウザーの互換性

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
desc

Legend

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

Full support
Full support

関連情報