From 382e366196b2b9aa7eb08c92776e6f716f8f5d65 Mon Sep 17 00:00:00 2001 From: Volker E Date: Tue, 14 Nov 2017 15:00:46 -0800 Subject: [PATCH] Hide empty OOUI FieldsetLayout headers In cases where the label or the icon are unset the header shouldn't take up space, nor should it be visible to screenreaders. That's a workaround, it should not be in the markup. T180535 is the place to address the unnecessary markup further. Bug: T177668 Bug: T180535 Change-Id: I39088107e6ab07399f9826dd925df9e1b8dda006 --- resources/src/mediawiki/htmlform/ooui.styles.less | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/resources/src/mediawiki/htmlform/ooui.styles.less b/resources/src/mediawiki/htmlform/ooui.styles.less index 1607489df9..e78a4caab7 100644 --- a/resources/src/mediawiki/htmlform/ooui.styles.less +++ b/resources/src/mediawiki/htmlform/ooui.styles.less @@ -1,4 +1,4 @@ -/* OOUIHTMLForm styles */ +// OOUIHTMLForm styles .mw-htmlform-ooui-wrapper.oo-ui-panelLayout-padded { padding: 1em 1.25em 1.25em; } @@ -43,9 +43,14 @@ } } -/* Flatlist styling for PHP widgets... */ +// HACK: Hide empty fieldsetLayoutHeaders, until T180535 isn't resolved +.oo-ui-fieldsetLayout:not( .oo-ui-labelElement ):not( .oo-ui-iconElement ) > .oo-ui-fieldsetLayout-header { + display: none; +} + +// Flatlist styling for PHP widgets... .mw-htmlform-flatlist .oo-ui-fieldLayout-align-inline, -/* ...and for JS widgets */ +// ...and for JS widgets .mw-htmlform-flatlist .oo-ui-radioOptionWidget, .mw-htmlform-flatlist .oo-ui-checkboxMultioptionWidget { display: inline-block; -- 2.20.1