Skip to content

Commit

Permalink
ZK-5787: aria-hidden elements do not contain focusable elements
Browse files Browse the repository at this point in the history
  • Loading branch information
jumperchen committed Sep 11, 2024
1 parent 6753824 commit 31bb518
Show file tree
Hide file tree
Showing 4 changed files with 103 additions and 0 deletions.
1 change: 1 addition & 0 deletions zkdoc/release-note
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ ZK 10.1.0
ZK-5677: Executions.schedule cause infinite loop if async event causes exception
ZK-5696: Nested Shadow element fails in ZK 10
ZK-5703: Debug messages shouldn't be created if debug is disabled, may cause side effects
ZK-5787: aria-hidden elements do not contain focusable elements

* Upgrade Notes
+ Remove Htmls.encodeJavaScript(), Strings.encodeJavaScript(), Strings.escape() with Strings.ESCAPE_JAVASCRIPT, and replace them with OWASP Java Encoder APIs instead.
Expand Down
69 changes: 69 additions & 0 deletions zktest/src/main/webapp/test2/B101-ZK-5787.zul
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
B101-ZK-5787.zul
Purpose:
Description:
History:
2024/9/11, Created by jumperchen
Copyright (C) 2024 Potix Corporation. All Rights Reserved.
-->
<zk xmlns:ca="client/attribute">
<listbox width="350px" ca:aria-label="a listbox">
<listhead>
<listheader label="name" sort="auto"/>
<listheader label="gender"/>
<listheader label="phone"/>
</listhead>
<listitem>
<listcell label="Mary1"/>
<listcell label="FEMALE"/>
<listcell label="000000000"/>
</listitem>
<listitem>
<listcell label="Mary2"/>
<listcell label="FEMALE"/>
</listitem>
<listitem>
<listcell label="Mary3"/>
<listcell label="FEMALE"/>
<listcell label="000000000"/>
</listitem>
<listgroup ca:aria-label="Some group">
<listcell label="Assignee"/>
</listgroup>
<listitem>
<listcell label="Mary4"/>
<listcell label="FEMALE"/>
</listitem>
<listgroupfoot>
<listcell label="Foot1"/>
<listcell label="Foot2"/>
</listgroupfoot>
<listitem>
<listcell label="Mary5"/>
<listcell label="FEMALE"/>
<listcell label="000000000"/>
</listitem>
<listitem>
<listcell label="Mary6"/>
<listcell label="FEMALE"/>
<listcell label="000000000"/>
</listitem>
<listitem>
<listcell label="Mary7"/>
<listcell label="FEMALE"/>
<listcell label="000000000"/>
</listitem>
<listfoot>
<listfooter label="footer 1"/>
<listfooter label="footer 2"/>
<listfooter label="footer 3"/>
</listfoot>
</listbox>
</zk>
1 change: 1 addition & 0 deletions zktest/src/main/webapp/test2/config.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3132,6 +3132,7 @@ B90-ZK-4431.zul=A,E,Multislider
##zats##B101-ZK-5659-2.zul=A,E,ClientMVVM,Tree,Model,ROD
##zats##B101-ZK-5677.zul=A,E,Scheduler,Event,Exception
##zats##B101-ZK-5696.zul=A,E,NestedShadow,ServerMVVM,ForEach,Differ
##zats##B101-ZK-5787.zul=A,E,WCAG,Accessibility,Focus,Tabindex,Aria-hidden

##
# Features - 3.0.x version
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/* B101_ZK_5787Test.java
Purpose:
Description:
History:
5:18 PM 2024/9/11, Created by jumperchen
Copyright (C) 2024 Potix Corporation. All Rights Reserved.
*/
package org.zkoss.zktest.zats.test2;

import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;

import org.zkoss.test.webdriver.WebDriverTestCase;

/**
* @author jumperchen
*/
@Tag("WcagTestOnly")
public class B101_ZK_5787Test extends WebDriverTestCase {
@Test
public void test() {
connect();
assertNoJSError();
click(jq(".z-listcell:eq(0)"));
waitResponse();
assertNoJSError();
}
}

0 comments on commit 31bb518

Please sign in to comment.