Skip to content

Commit

Permalink
fix(choice): use span instead of div
Browse files Browse the repository at this point in the history
- labels shouldn't wrap divs; switching to spans instead
  • Loading branch information
theetrain committed Feb 5, 2018
1 parent 1639989 commit 4c6ee5b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ exports[`Checkbox renders 1`] = `
<label
for="the-group-name_the-value"
>
<div
<span
class="betweenRightMarginDesktop-3 inline alignFlexStart"
>
<span
Expand All @@ -28,7 +28,7 @@ exports[`Checkbox renders 1`] = `
>
A label
</span>
</div>
</span>
</label>
</div>
`;
2 changes: 1 addition & 1 deletion src/components/Choice/Choice.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class Choice extends React.Component {
<Box between={2}>
{feedback === 'error' && error && renderError(error, errorId)}
<label htmlFor={choiceId}>
<Box inline between={3} dangerouslyAddClassName={styles.alignFlexStart}>
<Box tag="span" inline between={3} dangerouslyAddClassName={styles.alignFlexStart}>
<span className={fakeInputClassNames} data-testid="fake-input">
<input
{...safeRest(rest)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ exports[`Radio renders 1`] = `
<label
for="the-group_the-value"
>
<div
<span
class="betweenRightMarginDesktop-3 inline alignFlexStart"
>
<span
Expand All @@ -28,7 +28,7 @@ exports[`Radio renders 1`] = `
>
A label
</span>
</div>
</span>
</label>
</div>
`;

0 comments on commit 4c6ee5b

Please sign in to comment.