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

Tree WCAG aria-setsize violation

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reopened
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: 9.5.0
    • Fix Version/s: None
    • Component/s: Components
    • Labels:

      Description

      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


        Attachments

          Issue Links

            Activity

              People

              Assignee:
              DevChu DevChu
              Reporter:
              rudyhuang rudyhuang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated: