Is presence of aria-hidden sufficient or is value set to “true” required (aria-hidden=“true”)

前端 未结 2 625
谎友^
谎友^ 2021-01-23 01:06

The html \"hidden\" attribute is a boolean and does NOT need a value set. It\'s mere presence is sufficient.

What about the \"aria-hidden\" attribute? Is it\'s mere p

2条回答
  •  囚心锁ツ
    2021-01-23 01:26

    You must supply a value for aria-hidden.

    "If an element is only visible after some user action, authors MUST set the aria-hidden attribute to true. When the element is presented, authors MUST set the aria-hidden attribute to false or remove the attribute, indicating that the element is visible."

    https://www.w3.org/WAI/PF/aria/states_and_properties#aria-hidden

提交回复
热议问题