You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(a11y): size and centre the field label info icon
The design puts the info icon at 20x20 beside the label; ours asked for 12,
and since info-outlined draws its circle across 20 of a 24 viewBox that
rendered a 10px target. It is 16 now.
It also sat 2px above the text. .control-label is display: block, so the
tooltip's inline-flex wrapper took part in inline layout, and an
inline-flex box whose only child is a replaced element baselines on its
bottom margin edge rather than its content. The svg { vertical-align:
bottom } rule alongside it cannot correct that: vertical-align is ignored
on flex items.
Laying the label out as a centred flex row puts the icon dead on the text
centre. vertical-align: middle was the other candidate and overshoots by
1.3px, aligning to half the x-height rather than the cap centre.
That goes on FieldLabel's own element, not on .control-label. Nine
hand-written labels across six other files carry that class, none of them
with an icon to align, so they keep display: block and this touches only
what FieldLabel renders. The stylesheet is unchanged.
Checked against block: the label keeps its full width, and a long label
still wraps to the same height.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
0 commit comments