Skip to content

Commit

Permalink
Revert "fix(fields): isHidden with display none makes label unaccessi…
Browse files Browse the repository at this point in the history
…ble"

This reverts commit 4253739.
  • Loading branch information
maximeperraultdev committed Jul 9, 2024
1 parent 19f3dc9 commit f9f2ae4
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/elements/Label.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const Label = styled.label.attrs<LabelProps, LabelProps>(props => ({
color: ${p =>
// eslint-disable-next-line no-nested-ternary
p.disabled ? p.theme.color.lightGray : p.hasError ? p.theme.color.maximumRed : p.theme.color.slateGray};
display: ${p => (p.isHidden ? 'none' : 'block')};
font-size: 13px;
line-height: 1.3846;
margin-bottom: 4px;
Expand All @@ -25,14 +26,4 @@ export const Label = styled.label.attrs<LabelProps, LabelProps>(props => ({
content:" *";
color: ${p.theme.color.maximumRed};
}`}
${p =>
p.isHidden &&
`
position:absolute;
left:-10000px;
top:auto;
width:1px;
height:1px;
overflow:hidden;
`}
`

0 comments on commit f9f2ae4

Please sign in to comment.