Page MenuHomePhabricator

Allow radio select input widget to pass help text through to individual radio input widgets
Open, Needs TriagePublic

Description

It can be useful to have help text explaining individual options within a RadioSelectInputWidget. There currently isn't a way to pass help text to an individual radio option in OOUI, so where help text is required, it must be added to the label manually.

The PHP version of the RadioSelectInputWidget creates a RadioInputWidget, nested inside a FieldLayout, for each of its options. FieldLayouts accept a 'help' config for adding a help text label. Hence, it would be possible to pass through the help text for each option.

However, the JavaScript version of RadioSelectInputWidget creates a RadioOptionWidget for each of its options, and this is not nested inside a FieldLayout. The RadioOptionWidget does not have a way to add help text.

One solution could be to be for the JS widget to nest RadioOptionWidgets inside FieldLayouts.

Event Timeline

@matmarex Is there some reason for these differences in the radio options?

No, I wrote them this way because it was easier at the time. It would be nice if the JS and PHP versions had the same structure.

Removing task assignee due to inactivity, as this open task has been assigned for more than two years (see emails sent to assignee on May26 and Jun17, and T270544). Please assign this task to yourself again if you still realistically [plan to] work on this task - it would be very welcome!

(See https://www.mediawiki.org/wiki/Bug_management/Assignee_cleanup for tips how to best manage your individual work in Phabricator.)