Skip to content

Commit

Permalink
Merge pull request #944 from ZopaPublic/role-status
Browse files Browse the repository at this point in the history
Role status
  • Loading branch information
charlielizzy authored Dec 6, 2023
2 parents 8bf3e4d + ac4f7aa commit 777e948
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/atoms/Alert/Alert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ const Alert = ({
</CrossButton>
)}
</IconWrapper>
<div className={onRequestClose ? 'pr-4' : ''}>{children}</div>
<div role="status" className={onRequestClose ? 'pr-4' : ''}>
{children}
</div>
</Wrapper>
);
};
Expand Down
5 changes: 5 additions & 0 deletions src/components/atoms/Alert/__snapshots__/Alert.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ exports[`Alert renders the component with no props and no a11y violations 1`] =
</div>
<div
class=""
role="status"
>
Alert Content
</div>
Expand Down Expand Up @@ -138,6 +139,7 @@ exports[`Alert renders with specific severity: alert 1`] = `
</div>
<div
class=""
role="status"
>
Alert Content
</div>
Expand Down Expand Up @@ -210,6 +212,7 @@ exports[`Alert renders with specific severity: info 1`] = `
</div>
<div
class=""
role="status"
>
Alert Content
</div>
Expand Down Expand Up @@ -282,6 +285,7 @@ exports[`Alert renders with specific severity: success 1`] = `
</div>
<div
class=""
role="status"
>
Alert Content
</div>
Expand Down Expand Up @@ -354,6 +358,7 @@ exports[`Alert renders with specific severity: warning 1`] = `
</div>
<div
class=""
role="status"
>
Alert Content
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ exports[`Banner renders the component with no props and no a11y violations 1`] =
</div>
<div
class=""
role="status"
>
Banner Content
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ exports[`Notification renders the component with no props and no a11y violations
</div>
<div
class=""
role="status"
>
Notification Content
</div>
Expand Down

0 comments on commit 777e948

Please sign in to comment.