Field - child elements rendered with font-size: 0
albertfdp opened this issue · 2 comments
Expectations
It should be possible to render <Anchor />
tags and other elements as child of <Field />
Reality
Tags that implement font-size: inherit
result in not being rendered when child or nested child of Field
as it implements font-size: 0
. (Introduced in https://github.com/zendeskgarden/react-components/pull/1076/files#diff-5a92bfca891e0c20d051635b3021272225e65bd3115c8af399fea8abfe933944R27)
This results in elements unexpectedly disappearing from previous versions behavior.
Before
After
Steps to Reproduce
- Import
Field
fromreact-forms
- Import
Anchor
fromreact-buttons
(it can also be a<div />
) - Render
<Field><Anchor>Hello world</Anchor></Field>
Example here: https://codesandbox.io/s/exciting-currying-ife3u5?file=/src/Example.tsx
Fine Print
- Component: Field
- Version: ^8.37.0
- Browsers: all
Hey @albertfdp thanks for reporting this, will be looking into this with the team.
@albertfdp this along with a number of a11y violations is fixed with Garden's new Combobox
. Please see the following references for details: