summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/wai-aria/role/table-roles.html
blob: 6ffb94218d6174eaa061adb512d378855a808c37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<!doctype html>
<html>
  <head>
    <title>Table Role Verification Tests</title>
    <script src="/resources/testharness.js"></script>
    <script src="/resources/testharnessreport.js"></script>
    <script src="/resources/testdriver.js"></script>
    <script src="/resources/testdriver-vendor.js"></script>
    <script src="/resources/testdriver-actions.js"></script>
    <script src="/wai-aria/scripts/aria-utils.js"></script>
  </head>
<body>
    <p>Tests <a href="https://w3c.github.io/aria/#table">table</a> and related roles.</p>

<!-- HTML <table> Elements Testing  -->

    <!-- <caption> -> wpt/html-aam/table-roles.html -->

    <!-- <table> -> wpt/html-aam/table-roles.html -->
    <!-- <tbody> -> wpt/html-aam/table-roles.html -->

    <!-- <td> -> wpt/html-aam/table-roles.html -->

    <!-- <tfoot> -> wpt/html-aam/table-roles.html -->

    <!-- <th> -> wpt/html-aam/table-roles.html -->
    <!-- <thead> -> wpt/html-aam/table-roles.html -->

    <!-- <tr> -> wpt/html-aam/table-roles.html -->


<!-- ARIA Grid Elements Testing  -->

        <!-- Grid roles tested in ./grid-roles.html -->


<!-- ARIA Table Roles Testing  -->

    <!-- caption -->
    <div role="table">
        <div role="caption" data-testname="div role is caption (in div with table role)" data-expectedrole="caption" class="ex">x</div>
    </div>

    <p role="caption" data-testname="orphan p role is caption" data-expectedrole="caption" class="ex">x</p>

    <!-- cell -->
    <div role="table">
        <div role="rowgroup">
            <div role="row">
              <span role="columnheader">x</span>
              <span role="columnheader">x</span>
            </div>
        </div>
        <div role="rowgroup">
            <div role="row">
                <span role="cell" data-testname="span role is cell (in div with row role, in div with rowgroup role, in div with table role)" data-expectedrole="cell" class="ex">x</span>
                <span role="cell">x</span>
            </div>
        </div>
    </div>

    <span role="cell" data-testname="orphan span role is cell" data-expectedrole="cell" class="ex">x</span>

    <!-- columnheader -->
    <div role="table">
        <div role="rowgroup">
            <div role="row">
                <span role="columnheader" data-testname="span role is columnheader (in div with row role, in div with rowgroup role, in div with table role)" data-expectedrole="columnheader" class="ex">x</span>
                <span role="columnheader">x</span>
                <span role="columnheader">x</span>
            </div>
        </div>
        <div role="rowgroup">
            <div role="row">
                <span role="rowheader">x</span>
                <span role="cell">x</span>
                <span role="cell">x</span>
            </div>
        </div>
    </div>

    <!-- columnheader, orphaned -> ./grid-roles.html -->

    <!-- row -->
    <div role="table">
        <div role="rowgroup">
            <div role="row" data-testname="div role is row (in div with rowgroup role, in div with table role)" data-expectedrole="row" class="ex">
                <span role="columnheader">x</span>
            </div>
        </div>
        <div role="rowgroup">
            <div role="row">
                <span role="cell">x</span>
            </div>
        </div>
    </div>

    <!-- row, orphaned -> ./grid-roles.html -->

    <!-- rowgroup -->
    <div role="table">
        <div role="rowgroup" data-testname="div role is rowgroup (in div with table role)" data-expectedrole="rowgroup" class="ex">
            <div role="row">
                <span role="columnheader">x</span>
                <span role="columnheader">x</span>
            </div>
        </div>
        <div role="rowgroup">
            <div role="row">
                <span role="cell">x</span>
                <span role="cell">x</span>
            </div>
        </div>
    </div>

    <!-- rowgroup, orphaned -> ./grid-roles.html -->

    <!-- rowheader -->
    <div role="table">
        <div role="rowgroup">
            <div role="row">
                <span role="columnheader">x</span>
                <span role="columnheader">x</span>
                <span role="columnheader">x</span>
            </div>
        </div>
        <div role="rowgroup">
            <div role="row">
                <span role="rowheader" data-testname="role is rowheader (in div with row role, in div with rowgroup role, in div with table role)" data-expectedrole="rowheader" class="ex">x</span>
                <span role="cell">x</span>
                <span role="cell">x</span>
                <span role="cell">x</span>
            </div>
        </div>
      </div>

    <!-- rowheader, orphaned -> ./grid-roles.html -->

    <!-- table -->
    <div role="table" data-testname="div role is table" data-expectedrole="table" class="ex">
        <div role="row">
            <span role="columnheader">x</span>
            <span role="columnheader">x</span>
        </div>
        <div role="row">
            <span role="cell">x</span>
            <span role="cell">x</span>
        </div>
    </div>

<script>
    AriaUtils.verifyRolesBySelector(".ex");
</script>

</body>
</html>