Page MenuHomePhabricator

Confusing behavior of OOUI-PHP IconWidget invisibleLabel parameter
Open, Needs TriagePublic

Description

IconWidget has a LabelElement trait, which takes an invisibleLabel parameter, which is documented as "Whether the label should be visually hidden (but still accessible to screen-readers)". The label will still be visually hidden when it is set to false, though. Either this is a bug or it should be clearly documented that this option is not available.

Event Timeline

@Tgr Not reproducible in my tests.

new OOUI\ButtonWidget( [
	'framed' => false,
	'icon' => 'edit',
	'label' => 'Edit',
	'invisibleLabel' => false,
	'title' => 'Icon only'
] )

leads to the label being visible.

image.png (142×554 px, 10 KB)