graycoreio / daffodil

Angular Ecommerce PWA Framework
https://next.daff.io
MIT License
154 stars 27 forks source link

fix(design): only add the aria expanded attribute when tree item has children #2886

Closed xelaint closed 1 month ago

xelaint commented 1 month ago

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

aria-expanded is set on all tree items, even when it's not expandable (does not have child tree items)

Fixes: #2855

What is the new behavior?

aria-expanded is now only set if tree item has children.

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information