Use the RDF model diagram to help:
aria-expanded
is defined for the treeitem
role via inheritance.
aria-hidden
is defined for all roles, but has this caveat:
Note: Authors are advised to avoid using aria-hidden="false" with styles or attributes that have historically prevented rendering in all modalities, such as display:none or visibility:hidden in CSS, or the hidden attribute in HTML 5. At the time of this writing, aria-hidden="false" is known to work inconsistently when used in conjunction with such features. As future implementations improve, use caution and test thoroughly before relying on this approach.
As a result, aria-expanded
by itself should suffice.
References