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

Single checkbox input is missing ARIA attributes #6303

Closed avernet closed 4 months ago

avernet commented 5 months ago

We want the input we tab to to have the aria-* attributes.

Related: https://github.com/orbeon/orbeon-forms/issues/6279.

+1 from customer

ebruchez commented 4 months ago

We put aria-* attributes on a group because it makes sense when there are more than one item. Obviously, it doesn't make much sense when there is only one item.

We could detect the case where there is only one item statically, and produce different markup. Note that this is not a static itemset, because the label value can change. But we know that the number of items won't change dynamically.

ebruchez commented 4 months ago

If we detect a single-item full xf:select:

On <span> around items:

Instead, on <input>: