@kazuhito
Kazuhito Kidachi's Personal Web Site Since 2000

消去法(謎)によるメインコンテンツの明示、またはメインコンテンツとは何か

Bruce Lawson氏の記事、Bruce Lawson's personal site  : Reading Listに紹介されていたなかで、ふとRe: [whatwg] "content" element, which we need in our documents from Ian Hickson on 2012-08-30 (public-whatwg-archive@w3.org from August 2012)が気になりました。僕はWHATWGのメーリングリストをチェックしていなかった(そして今回の一件を機にpublic-whatwg-archiveに参加した)のですけど、そちらでcontent要素(何)の是非について議論があったらしく、Hixie氏がコメントしたらしい。なぜ僕が気になったかといえば、以前引き続きスキップリンクの話を書いたなかでメインコンテンツの明示方法に関する標準化が必要ではないかと書いたように、さすがに新しい要素タイプまでは必要ないにせよ、content要素の発案者に近い感覚を持っていたからなんですね。Hixie氏の意見としては基本的にcontent要素は必要ない、なぜならbody要素がコンテンツそのものをあらわすのであって、header要素やfooter要素、nav要素なんかをDOMツリー上で除くことができればコンテンツを取り出すことはできるだろう、と。ちゃんとスレッドを読んだわけではないので、多分に僕の推測やら誤解もあり得るにせよ、概ねそういうスタンスなのだろうと感じました。そこでふと、body要素がメインコンテンツを明示するための要素であり得るならば、role="main"の必要性はどうなるのかなと思いつぶやいたところから、Lawson氏(@brucel)とのやりとりが始まりました:

  1. understood why <content> doesn't exist, but then why do we need role=main? still not clear to me.
  2. do we need role=main ?
  3. role=main can be better than adding skip links, if browsers help specifying where main content starts IMHO
  4. no need for skip links, if AT understands <nav>. role=main should be for legacy content
  5. to me, role=main seems the easiest way to specifying main content for authors (and for browser vendors too, just guessing though)
  6. authors do nothing, and browser does "first thing that's not <nav>, <footer>, <header> or <aside>" seems pretty easy, too
  7. agree, but is that implemented to AT/UA widely? if yes, I'm very happy anyway :-)
  8. don' t think so yet, which is why role=main exists as a bridging technology
  9. ok then, HTML5 markup with proper document structure can "naturally" pass the SC 2.4.1 http://bit.ly/PSgshK in future?
  10. "It is not the intent of this SC to require authors to provide methods that are redundant to functionality provided by the UA"
  11. will blog this on Monday - OK if I quote your tweets?
  12. yes, I'm fine.
  13. arigato

Lawson氏の、role="main"はレガシーなコンテンツのために付与すべきとの見解は、当初「え、そうだったの?」という感じに聞こえたのですけど、Hixie氏のシンプルな考え方に基づくなら、さもありなん。ただし、body要素内容からheader/footer/navといった各要素内容を除き、自動的にメインコンテンツの中身、あるいはその先頭位置へのアクセスをユーザーに提供する機能が広くユーザーエージェントなり支援技術の側が実装するまでは、role="main"がそれに類する利便を提供するためのトリガーになり得るという点については、僕と同意見であるかのように思えます。main (role)の説明には、The main role is a non-obtrusive alternative for "skip to main content" links, where the navigation option to go to the main content (or other landmarks) is provided by the user agent through a dialog or by assistive technologies.とあるにせよ。もちろんrole属性のサポートとて、いまだ道半ばかもしれませんが......ただ、以前からわざわざページ内リンクを静的に用意してまでメインコンテンツ(の先頭)を明示する必要性を感じていなかった自分の思いからすると、それを用意せずして(制作者が用意の労をせずとも)WCAG 2.0達成基準 2.4.1を満たせる可能性があるなら、そのような方向で仕様の策定なり機能の実装なり制作者側の共通認識の醸成が進んでくれたらいいな、と。最早、スキップリンク云々の狭い話ではなく、HTML5で使えるようになった新要素の利便をどう享受するかって話ではあるのですが。

......とりあえずLawson氏のBlog記事を待ちたいと思います。

現在地:ホーム > 覚え書き > 月別アーカイブ > 2012年9月 > 消去法(謎)によるメインコンテンツの明示、またはメインコンテンツとは何か
Google カスタム検索を利用しています