Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-4750

Tree WCAG aria-setsize violation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 9.5.0
    • Components

      Steps to Reproduce

      <?xml version="1.0" encoding="UTF-8"?>
      <?page title="Tree test"?>
      <?root-attributes lang="en"?>
      <zk xmlns:n="native" xmlns:ca="client/attribute">
      	<style><![CDATA[
      		/* FIXME: For demonstration only, should apply to theme itself. */
      		:focus{
      			outline: solid;
      			outline-color: red;
      			outline-offset: -1px;
      		}
      	]]></style>
      	<n:header>
      		<n:h1>Tree</n:h1>
      	</n:header>
      	<n:main>
      		<button label="test focus" />
      		<zscript><![CDATA[
      		List childnodes = new LinkedList();
      		for (int i = 0; i < 500; ++i) {
      			childnodes.add(new DefaultTreeNode("" + i));
      		}
      		DefaultTreeNode root = new DefaultTreeNode("", childnodes);
      		DefaultTreeModel model = new DefaultTreeModel(root);
      		]]></zscript>
      		<label multiline="true">
      		1. Scroll to item ~100 to trigger ROD load
      		2. Scan with aXe
      		3. No "Elements must only use allowed ARIA attributes" (ARIA attribute is not allowed: aria-setsize="n")
      		</label>
      		<tree model="${model}" rows="10" ca:aria-label="a tree">
      			<treecols>
      				<treecol id="tcola" label="A" />
      				<treecol label="B" />
      			</treecols>
      			<template name="model">
      				<treeitem>
      					<treerow>
      						<treecell label="${each}"/>
      						<treecell label="${each}"/>
      					</treerow>
      				</treeitem>
      			</template>
      		</tree>
      	</n:main>
      </zk>
      
      1. Scroll to item ~100 to trigger ROD load
      2. Scan with aXe

      Current Result

      Many errors
      "Elements must only use allowed ARIA attributes" (ARIA attribute is not allowed: aria-setsize="n")

      Expected Result

      No "Elements must only use allowed ARIA attributes" (ARIA attribute is not allowed: aria-setsize="n")

      Debug Information

      https://www.w3.org/TR/html-aria/#index-aria-row
      role=row can have an aria-setsize, but the parent must be a treegrid.

      We have an ancestor of treegrid (not a parent).

      Could be a scanning bug of aXe?

      Workaround


            jamson jamson
            rudyhuang rudyhuang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: