Skip to content

Commit

Permalink
feat(ActionRequirement): improve accessibility
Browse files Browse the repository at this point in the history
  • Loading branch information
mavericardo committed Nov 19, 2024
1 parent 4d34e4e commit b37f671
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions packages/yoga/src/ActionRequirement/web/ActionRequirement.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ function ActionRequirement(props) {
defineCompoundComponents();
return (
<StyledActionRequirement {...props}>
{illustration && <BoxIllustration>{illustration}</BoxIllustration>}
{illustration && <BoxIllustration aria-hidden="true">{illustration}</BoxIllustration>}

Check failure on line 76 in packages/yoga/src/ActionRequirement/web/ActionRequirement.jsx

View workflow job for this annotation

GitHub Actions / linter_and_tests

Replace `<BoxIllustration·aria-hidden="true">{illustration}</BoxIllustration>` with `(⏎········<BoxIllustration·aria-hidden="true">{illustration}</BoxIllustration>⏎······)`

<Content>
{titleAsTextDisplay ? (
<Text.Display2>{title}</Text.Display2>
<Text.Display2 as="h1" aria-label={title} tabIndex={0}>{title}</Text.Display2>

Check failure on line 80 in packages/yoga/src/ActionRequirement/web/ActionRequirement.jsx

View workflow job for this annotation

GitHub Actions / linter_and_tests

Replace `{title}` with `⏎············{title}⏎··········`
) : (
<Title>{title}</Title>
<Title aria-label={title} tabIndex={0}>{title}</Title>

Check failure on line 82 in packages/yoga/src/ActionRequirement/web/ActionRequirement.jsx

View workflow job for this annotation

GitHub Actions / linter_and_tests

Replace `{title}` with `⏎············{title}⏎··········`
)}
<Text.Body1 mt="small" color="deep">
<Text.Body1 mt="small" color="deep" aria-label={description} tabIndex={0}>

Check failure on line 84 in packages/yoga/src/ActionRequirement/web/ActionRequirement.jsx

View workflow job for this annotation

GitHub Actions / linter_and_tests

Replace `·mt="small"·color="deep"·aria-label={description}·tabIndex={0}` with `⏎··········mt="small"⏎··········color="deep"⏎··········aria-label={description}⏎··········tabIndex={0}⏎········`
{description}
</Text.Body1>
{list && <Box mt="large">{list}</Box>}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Box from '../../Box';
import Button from '../../Button';

export const Title = styled(Text.H4).attrs({
as: 'p',
as: 'h1',
bold: true,
})`
${({
Expand Down

0 comments on commit b37f671

Please sign in to comment.