Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZK-5787: aria-hidden elements do not contain focusable elements #3200

Merged
merged 1 commit into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions zkdoc/release-note
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ ZK 10.1.0
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-5716: Errorbox contains inline script
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 @@ -3133,6 +3133,7 @@ B90-ZK-4431.zul=A,E,Multislider
##zats##B101-ZK-5677.zul=A,E,Scheduler,Event,Exception
##zats##B101-ZK-5696.zul=A,E,NestedShadow,ServerMVVM,ForEach,Differ
##zats##B101-ZK-5716.zul=A,E,CSP,Security,Content-Security-Policy,Unsafe-inline
##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();
}
}
Loading