File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
packages/ui-tree-browser/src/TreeBrowser/TreeCollection Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -360,7 +360,9 @@ describe('<TreeCollection />', async () => {
360360 const collection = await TreeCollectionLocator . find ( )
361361 const childs = await collection . findAllItems ( )
362362 const childNameArr = childs . map ( ( child ) => {
363- return child . getDOMNode ( ) . ariaLabel
363+ return child
364+ . getDOMNode ( )
365+ . querySelector ( 'span[class$="treeButton__textName"]' ) ?. textContent
364366 } )
365367 expect ( childNameArr . slice ( 1 ) ) . deep . equal ( [
366368 'A' ,
@@ -410,7 +412,9 @@ describe('<TreeCollection />', async () => {
410412 const collection = await TreeCollectionLocator . find ( )
411413 const childs = await collection . findAllItems ( )
412414 const childNameArr = childs . map ( ( child ) => {
413- return child . getDOMNode ( ) . ariaLabel
415+ return child
416+ . getDOMNode ( )
417+ . querySelector ( 'span[class$="treeButton__textName"]' ) ?. textContent
414418 } )
415419 expect ( childNameArr . slice ( 1 ) ) . deep . equal ( [
416420 'Item A' ,
Original file line number Diff line number Diff line change @@ -387,7 +387,9 @@ class TreeCollection extends Component<
387387 tabIndex = { - 1 }
388388 /* eslint-disable-next-line jsx-a11y/role-has-required-aria-props */
389389 role = "treeitem"
390- aria-label = { this . props . name }
390+ aria-label = { `${ this . props . name } ${
391+ this . props . descriptor ? ` ${ this . props . descriptor } ` : ''
392+ } `}
391393 aria-level = { level }
392394 aria-posinset = { position }
393395 aria-setsize = { this . props . numChildren }
You can’t perform that action at this time.
0 commit comments