discuzx2.0 默认模板无障碍优化工具

悠然云影同学正在做一个音乐类论坛,刚才问我如何修改模板,于是找出来去年为争渡读屏论坛写的一个模板优化脚本,现在发上来,或许会有人感兴趣,希望有多一个discuz论坛使用,为盲人带来一点方便。

本工具适用于使用discuzx2.0默认模板的论坛。主要功能有:

  1. 补全部分表单元素的label标签
  2. 重要页面的重要位置添加快捷键
  3. 主要快捷键有alt加x和alt加z
  4. 通过给元素增加accesskey属性实现快捷键
$cat[name]','$forum[name]','lastpost#lastpost" class="xi2"'); $ndiscuz = array('{/if}" accesskey="z">$cat[name]','$forum[name]','lastpost#lastpost" class="xi2" accesskey="x"'); $oforumdisplay = array('class="nvhm" title="{lang homepage}">$_G[setting][bbname]','forum.php">{lang return_index}','title="{lang send_posts}">document.onkeyup','$page);}'); $nforumdisplay = array('class="nvhm" title="{lang homepage}" accesskey="z">$_G[setting][bbname]','forum.php" accesskey="z">{lang return_index}','title="{lang send_posts}" accesskey="z">document.onkeyup','$page);} -->'); $oforumdisplay_list = array('>$thread[subject]'); $nforumdisplay_list = array(' title="$thread[subject]{LF}作者:$thread[author]{LF}发表时间:$thread[dateline]{LF}浏览次数:$thread[views]{LF}回复次数:$thread[replies]{LF}最后回复:$thread[lastposter]" accesskey="x">$thread[subject]'); $oviewthread = array('class="nvhm" title="{lang homepage}">$_G[setting][bbname]','">{lang return_forumdisplay}',''); $nviewthread = array('class="nvhm" title="{lang homepage}" accesskey="z">$_G[setting][bbname]','" accesskey="z">{lang return_forumdisplay}',''); $oviewthread_node = array('rel="nofollow">{lang thread_show_author}','rel="nofollow">{lang thread_show_all}'); $nviewthread_node = array('rel="nofollow" accesskey="x" title="$post[author] $postno[$post[number]]{$post[number]}{$postno[0]}">{lang thread_show_author}','rel="nofollow" accesskey="x" title="$post[author] $postno[$post[number]]{$post[number]}{$postno[0]}">{lang thread_show_all}'); $oforumdisplay_fastpost = array('{lang subject}{lang modcp_report_content}