Skip to content

Commit f94d3dd

Browse files
SiTaggartBrian Lonsdorf
authored andcommitted
fix(Treegrid): Add in missing ARIA row of gridcell to the td elements
1 parent cd6ff7a commit f94d3dd

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

ui/components/trees/grid/example.jsx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import SvgIcon from '../../../shared/svg-icon';
1010
// State Constructor(s)
1111
/// ///////////////////////////////////////////
1212

13-
const TreeGrid = props => (
13+
export const TreeGrid = props => (
1414
<table
1515
className="slds-table slds-table_bordered slds-tree slds-table_tree"
1616
role="treegrid"
@@ -110,29 +110,29 @@ const Row = props => (
110110
</a>
111111
</div>
112112
</th>
113-
<td data-label="Employees">
113+
<td data-label="Employees" role="gridcell">
114114
<div className="slds-truncate" title={props.employees}>
115115
{props.employees}
116116
</div>
117117
</td>
118-
<td data-label="Phone Number">
118+
<td data-label="Phone Number" role="gridcell">
119119
<div className="slds-truncate" title={props.phone}>
120120
{props.phone}
121121
</div>
122122
</td>
123-
<td data-label="Account Owner">
123+
<td data-label="Account Owner" role="gridcell">
124124
<div className="slds-truncate" title={props.owner}>
125125
<a href="javascript:void(0);" tabIndex="-1">
126126
{props.owner}
127127
</a>
128128
</div>
129129
</td>
130-
<td data-label="Billing City">
130+
<td data-label="Billing City" role="gridcell">
131131
<div className="slds-truncate" title={props.city}>
132132
{props.city}
133133
</div>
134134
</td>
135-
<td className="slds-cell-shrink">
135+
<td className="slds-cell-shrink" role="gridcell">
136136
<ButtonIcon
137137
aria-haspopup="true"
138138
assistiveText={`More actions for ${props.name}`}
@@ -146,7 +146,7 @@ const Row = props => (
146146
</tr>
147147
);
148148

149-
const Default = props => (
149+
export const DefaultRows = props => (
150150
<tbody>
151151
<Row
152152
aria-level="1"
@@ -195,7 +195,7 @@ const Default = props => (
195195
</tbody>
196196
);
197197

198-
const Expanded = props => (
198+
export const ExpandedRow = props => (
199199
<Row
200200
aria-level="2"
201201
aria-posinset="1"
@@ -208,7 +208,7 @@ const Expanded = props => (
208208
/>
209209
);
210210

211-
const DeepNesting = props => (
211+
export const DeepNestingRows = props => (
212212
<tbody>
213213
<Row
214214
aria-level="1"
@@ -367,7 +367,7 @@ const DeepNesting = props => (
367367

368368
export default (
369369
<TreeGrid>
370-
<Default />
370+
<DefaultRows />
371371
</TreeGrid>
372372
);
373373

@@ -377,7 +377,7 @@ export let states = [
377377
label: 'Expanded',
378378
element: (
379379
<TreeGrid>
380-
<Default isExpanded additionalItem={<Expanded />} />
380+
<DefaultRows isExpanded additionalItem={<ExpandedRow />} />
381381
</TreeGrid>
382382
)
383383
},
@@ -386,7 +386,7 @@ export let states = [
386386
label: 'Deeply nested branches',
387387
element: (
388388
<TreeGrid>
389-
<DeepNesting />
389+
<DeepNestingRows />
390390
</TreeGrid>
391391
)
392392
}

0 commit comments

Comments
 (0)