I have created a tree grid structure using the code base found here at the SLDS documentation url : https://lightningdesignsystem.com/components/tree-grid/

The problem I am facing is that I am not able to make the rows expand and collapse using the aria-expanded attribute. I am not so well versed with aria-attributes, but I researched and found no ways to relate the aria-level 1 and aria-level 2 items.

I was able to successfully, expand/collapse the items using the lightning tree structure, that is found in the same documentation site, but somehow it does not work with grid. Can someone guide me here, what might be going wrong?

  • Can you show the code you used? – salesforce-sas Aug 15 '19 at 17:09
  • aura-expanded is only a "hint" to screen readers. It does not actually collapse/expand the elements; you need to apply CSS to the elements to cause it to change appearance. – sfdcfox Aug 15 '19 at 17:17
  • @sfdcfox Got this salesforce.stackexchange.com/questions/179901/…... Thanks! I was thinking it adds some functionality to mobile interface – salesforce-sas Aug 15 '19 at 17:34
  • @sfdcfox How is it working on the tree structure, under SLDS? lightningdesignsystem.com/components/trees/#site-main-content Am I missing something here? Is there some baked in CSS under SLDS that handles it for the tree structure? I had just used the base template from the site, and no custom CSS added. It expanded and collapsed, just with that. – Tom Aug 15 '19 at 18:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.