the following error gets displ" /> the following error gets displ" /> the following error gets displ"/>

how to use aria attributes in binding.scala

152 Views Asked by At

How can i use aria attributes in Binding.scala?

When compiling the following:

 <div role="option" aria-checked="false"/>

the following error gets displayed:

value aria-checked is not a member of org.scalajs.dom.html.Div

fiddle: https://scalafiddle.io/sf/75Dqnso/0

1

There are 1 best solutions below

0
Yang Bo On BEST ANSWER

All properties defined in scala-js-dom is automatically available for XHTML literals in Binding.scala.

However, such aria-checked property has not been defined in current version of scala-js-dom. You can use custom attributes as a workaround:

<div data:role="option" data:aria-checked="false"></div>