Upgrade to Pro — share decks privately, control downloads, hide ads and more …

HTML5とSVGで考えるこれからの画像アクセシビリティ

 HTML5とSVGで考えるこれからの画像アクセシビリティ

Naoki Matsuda

May 29, 2015
Tweet

More Decks by Naoki Matsuda

Other Decks in Technology

Transcript

  1. path ཁૉ line ཁૉ rect ཁૉ circle ཁૉ ellipse ཁૉ

    polygon ཁૉ image ཁૉ text ཁૉ Lorem ipsum dolor
  2. <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http:// www.w3.org/1999/xlink" viewBox="0 0 100 100"> <path d="M0,42.197C0,18.892,18.892,0,42.197

    ... "/> <rect x="0" y="20" width="10" height="10"/> <polygon points="81.098,61.017 88.796,76.614 ... "/> <text>Lorem ipsum dolor</text> </svg>
  3. 47(ͷ୅ସʁςΩετ <svg viewBox="0 0 100 100"> <title> ハンバーガー </title> <desc>

    ハンバーガーのフラットな イラストアイコン </desc> … </svg>
  4. <rect x="10" y="10" width="20" height="20"> <title>すごく四角い</title> <desc>…</desc> </rect> <g x="10"

    y="10"> <title>たくさん丸い</title> <desc>…</desc> <path …> <circle …> <circle …> <circle …> </g> ਤܗͳͲͷཁૉʹ΋ άϧʔϓͳͲͷίϯςφཁૉʹ΋ άϧʔϓԽ
  5. <svg viewBox="0 0 100 100"> <title>フードメニュー</title> <desc>当店のフードメニューのイラストアイコン</desc> <g> <title>ハンバーガー</title> <desc>人気No.1。オリジナルのパティとトマトソース…</desc>

    </g> <g> <title>ホットドッグ</title> <desc>カリッと焼いた粗挽きソーセージのホット…</desc> </g> <g> <title>ドーナッツ</title> <desc>外はカリッ。中はモチモチ。そこそこヘルシー…</desc> </g> … </svg>
  6. <svg viewBox="0 0 100 100" role="img" aria-labelledby="title desc"> <title id="title">ハンバーガー</title>

    <desc id="desc">ハンバーガーのフラットなイ ラストアイコン</desc> … </svg> SPMFͱBSJBMBCFMMFECZͰରԠ͠·͠ΐ͏
  7. <svg viewBox="0 0 100 100" role="img" aria-labelledby="title desc"> <title id="title">ハンバーガー</title>

    <desc id="desc">トマトとレタス、チーズのハ ンバーガーのイラスト</desc> … </svg> 47(ͷεΫϦʔϯϦʔμʔରԠ ϋϯόʔΨʔɹτϚτͱϨλεɺνʔζͷϋϯόʔΨʔͷΠϥετɹΠϝʔδ
  8. 47(ͷεΫϦʔϯϦʔμʔରԠ <g role="img" aria-labelledby="title1 desc1"> <title id="title1">四角</title> <desc id="desc1">黒い正方形</desc> <rect

    width="100" height="100"/> </g> <g role="img" aria-labelledby="title2 desc2"> <title id="title2">丸</title> <desc id="desc2">黒い正円</desc> <circle cx="170" cy="50" r="50"/> </g> <g role="img" aria-labelledby="title3 desc3"> <title id="title3">三角</title> <desc id="desc3">黒い正三角形</desc> <polygon points="0,207 50,120 99.999,207 "/> </g> <g role="img" aria-labelledby="title4 desc4"> <title id="title4">星形</title> <desc id="desc4">黒い星</desc> <polygon points="169.987,112.12 185.438,143.427 219.987,148.447 194.987,172.816 200.889,207.226 169.987,190.98 139.086,207.226 144.987,172.816 119.987,148.447 154.536,143.427"/> </g>
  9. 47(ͷεΫϦʔϯϦʔμʔରԠ <g role="img" aria-labelledby="title1 desc1"> <title id="title1">四角</title> <desc id="desc1">黒い正方形</desc> <rect

    width="100" height="100"/> </g> <g role="img" aria-labelledby="title2 desc2"> <title id="title2">丸</title> <desc id="desc2">黒い正円</desc> <circle cx="170" cy="50" r="50"/> </g> <g role="img" aria-labelledby="title3 desc3"> <title id="title3">三角</title> <desc id="desc3">黒い正三角形</desc> <polygon points="0,207 50,120 99.999,207 "/> </g> <g role="img" aria-labelledby="title4 desc4"> <title id="title4">星形</title> <desc id="desc4">黒い星形</desc> <polygon points="169.987,112.12 185.438,143.427 219.987,148.447 194.987,172.816 200.889,207.226 169.987,190.98 139.086,207.226 144.987,172.816 119.987,148.447 154.536,143.427"/> </g> ࢛֯ɹࠇ͍ਖ਼ํܗɹΠϝʔδ ؙɹࠇ͍ਖ਼ԁɹΠϝʔδ ࡾ֯ɹࠇ͍ਖ਼ࡾ֯ܗɹΠϝʔδ ੕ܗɹࠇ͍੕ɹΠϝʔδ
  10. খωλ Authors should always provide a ‘title’ child element to

    the outermost svg element within a stand-alone SVG document. The ‘title’ child element to an ‘svg’ element serves the purposes of identifying the content of the given SVG document fragment. Since users often consult documents out of context, authors should provide context-rich titles. ಠཱͨ͠47(จॻͷ࠷΋֎ଆͷTWHཁૉʹର͠ ৗʹɺUJUMFཁૉΛࢠཁૉͱͯ͠༩͑Δ΂͖Ͱ͋Δ http://www.w3.org/TR/SVG/struct.html#DescriptionAndTitleElements Scalable Vector Graphics (SVG) 1.1 (Second Edition)
  11. 0 30 60 90 120 150 ౉ล ాத ߴڮ ླ໦

    ࠤ౻ ྫ͑͹ɺ͜Μͳάϥϑ
  12. 0 30 60 90 ౉ล ాத ߴڮ ླ໦ ࠤ౻ <g>

    <title id="point-sato"">230点</title> <text x="450" y="370">佐藤</text> <rect x="450" y="123" width="70" height="230" role="img" aria-labelledby="point-sato"/> </g>
  13. 0 30 60 90 120 150 ౉ล ాத ߴڮ ླ໦

    ࠤ౻ ͜ͷ··ͩͱɺશ෦ಡΈ্͛ΒΕΔͷʹ ͕͔͔࣌ؒͬͯ͠·͏
  14. 0 30 ౉ล ాத ߴڮ ླ໦ ࠤ౻ <g> <title id="point-sato">86点</title>

    <foreignObject x="76" y="273" width="40" height="25"> <h3>佐藤</h3> </foreignObject> <rect x="67" y="116 width="55" height="130" role="img" aria-labelledby="point-sato"/> </g>
  15. 0 30 60 90 120 ౉ล ాத ߴڮ ླ໦ ࠤ౻

    7PJDF0WFS౳ͷ ʮݟग़ؒ͠εΩοϓʯػೳ͕࢖͑Δ