[英]ADA 508 - redundant links on page links
We have links for Help and Logout in my application. 我们的应用程序中有帮助和注销的链接。 We are using GWT to create form fields.
我们正在使用GWT创建表单字段。 When the user clicks those links a JavaScript
onclick
function will get fired and do the required navigation. 当用户单击这些链接时,将触发JavaScript
onclick
函数并执行所需的导航。
Here is our code.. 这是我们的代码。
Anchor helpAnc = new Anchor("Help");
Label sep = new Label("|");
Anchor logoutAnc = new Anchor("Logout");
anchors.add(helpAnc);
anchors.add(sep);
anchors.add(logoutAnc);
But when I analyse in WAVE plug-in it is reporting Redundant link issue for Logout link. 但是当我在WAVE插件中进行分析时,它报告了注销链接的冗余链接问题。 It is due to auto population of
href="javascipt:;"
这是由于自动填充
href="javascipt:;"
for both links... 对于两个链接...
Please guide me to resolve this issue. 请指导我解决此问题。
Replace the Anchor
with a Label
since you are using a ClickHandler
anyway. 因为无论如何您都在使用
ClickHandler
,所以将Anchor
替换为Label
。
Then style the labels as a link. 然后将标签样式设置为链接。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.