I am trying to use Bootstrap within the Eliom framework but I cannot figure out how to use some of the html attributes correctly. Take for example the following code from the bootstrap website (http://getbootstrap.com/components/#btn-groups):
<div class="btn-group" role="group" aria-label="...">
<button type="button" class="btn btn-default">Left</button>
<button type="button" class="btn btn-default">Middle</button>
<button type="button" class="btn btn-default">Right</button>
</div>
I cannot figure out how to replicate the attributes role
and aria-label
in Eliom. They are not listed under type base_attributes
, type button_attrib
or type common
(http://ocsigen.org/tyxml/3.4/api/Html5_types#TYPEcommon). Can the above code be replicated in Eliom?
The
role
andaria-...
attributes are used to give hints to enhance accessibility for people with disabilities (see this ARIA article at MDN). Depending on the accessibility requirements you must decide if you need them, Bootstrap's styling and JavaScript components aren't dependent on them.Looking at the Ocsigen FAQ (look for "Some HTML5 element or attribute is missing. What can I do?") it seems that if you use the TyXML library you can use the low unsafe interface Html5_sigs.T.Unsafe. But frankly I don't know anything about Eliom.