orbeon / orbeon-forms

Orbeon Forms is an open source web forms solution. It includes an XForms engine, the Form Builder web-based form editor, and the Form Runner runtime.
http://www.orbeon.com/
GNU Lesser General Public License v2.1
514 stars 221 forks source link

XBL components support for `aria-invalid` and `aria-required` #6279

Closed avernet closed 5 months ago

avernet commented 5 months ago

We automatically add aria-labelledby, aria-describedby, and aria-errormessage on the element the XBL points to with xxbl:label-for, but we don't have a similar mechanism for the XForms/XBL engine to add and maintain aria-invalid and aria-required.

+1 from customer

ebruchez commented 5 months ago

One difference is that the other attributes are generated once and then remain unchanged.

In the case of aria-invalid and aria-required, we must add them and remove them dynamically as conditions change.

For this purpose, we must:

ebruchez commented 5 months ago

Use case: fr:date when using the native date picker. This might also apply to the non-native case, as in both cases we use an xh:input with xxf:control="true" within the XBL component, and the distinction between native/non-native is done in JavaScript.