【发布时间】:2015-01-06 00:59:26
【问题描述】:
我正在尝试将 aria-label 属性添加到链接以使其更易于访问。当我这样做时,它按预期工作:
<a href="/" class="site-name <%= is_active('home') %>" aria-label="<%= get_aria_label_current_page('home') %>">Version Postman</a>
但这不是:
<%= link_to t('nav.projects'), projects_path, class: is_active('projects'), aria-label: get_aria_label_current_page('home') %>
我收到“意外的 tLABEL”语法错误。有谁知道是什么问题?
谢谢。
【问题讨论】:
标签: ruby-on-rails ruby wai-aria