Page MenuHomePhabricator

OOUI RadioSelectInputWidget does not create radiogroup element
Closed, DeclinedPublic

Description

When using the OOUI\RadioSelectInputWidget PHP class to create a group of radio buttons no role='radiogroup' element is created to encapsulate the radio buttons. This is a different behavior to when I use OO.ui.RadioSelectInputWidget in JS.

Also the role='radiogroup' element is helpful navigating with screen readers.

Event Timeline

role='radiogroup' should not be necessary when the radio group in question is already connected by virtue of all its members having the same 'name' attribute, which they are for PHP RadioSelectInputWidget?

We can put a role='radiogroup' on it easily, but I'm not sure if that would be an improvement for anything, and according to comments on https://gerrit.wikimedia.org/r/#/c/208383/ (which added role='radiogroup' to JS RadioSelectInputWidget) we'd have to make elements with role='radio' direct children of the radiogroup (they currently aren't) for VoiceOver not to get confused.

Volker_E triaged this task as Medium priority.Jun 4 2018, 7:48 PM

Per previous comment.