Skip to content

Commit

Permalink
chore(overlay): role correction
Browse files Browse the repository at this point in the history
  • Loading branch information
francinelucca committed Nov 22, 2024
1 parent be5e615 commit 0e3d4d8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions packages/react/src/Overlay/Overlay.features.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export const DialogOverlay = ({anchorSide, role}: OverlayProps) => {
anchorSide={anchorSide}
role={role}
aria-modal={role === 'dialog' ? 'true' : undefined}
aria-label={role === 'list' ? 'Confirmation screen' : undefined}
aria-label={role === 'dialog' ? 'Confirmation screen' : undefined}
ref={containerRef}
>
<Box display="flex" flexDirection="column" p={2}>
Expand Down Expand Up @@ -172,7 +172,7 @@ export const OverlayOnTopOfOverlay = ({anchorSide, role}: OverlayProps) => {
anchorSide={anchorSide}
role={role}
aria-modal={role === 'dialog' ? 'true' : undefined}
aria-label={role === 'list' ? 'Open overlay' : undefined}
aria-label={role === 'dialog' ? 'Open overlay' : undefined}
ref={primaryContainer}
preventOverflow={false}
>
Expand All @@ -190,7 +190,7 @@ export const OverlayOnTopOfOverlay = ({anchorSide, role}: OverlayProps) => {
anchorSide={anchorSide}
role={role}
aria-modal={role === 'dialog' ? 'true' : undefined}
aria-label={role === 'list' ? 'Options' : undefined}
aria-label={role === 'dialog' ? 'Options' : undefined}
ref={secondaryContainer}
preventOverflow={false}
>
Expand Down Expand Up @@ -252,7 +252,7 @@ export const MemexNestedOverlays = ({role}: OverlayProps) => {
left={16}
role={role}
aria-modal={role === 'dialog' ? 'true' : undefined}
aria-label={role === 'list' ? 'Add iteration' : undefined}
aria-label={role === 'dialog' ? 'Add iteration' : undefined}
ref={containerRef}
preventOverflow={false}
>
Expand Down Expand Up @@ -338,7 +338,7 @@ export const NestedOverlays = ({role}: OverlayProps) => {
ref={primaryContainer}
role={role}
aria-modal={role === 'dialog' ? 'true' : undefined}
aria-label={role === 'list' ? 'Sample list' : undefined}
aria-label={role === 'dialog' ? 'Sample list' : undefined}
>
<Box sx={{display: 'flex', flexDirection: 'column', py: 2}}>
<Box sx={{paddingX: 3, paddingY: 2}}>
Expand Down Expand Up @@ -380,7 +380,7 @@ export const NestedOverlays = ({role}: OverlayProps) => {
left={64}
role={role}
aria-modal={role === 'dialog' ? 'true' : undefined}
aria-label={role === 'list' ? 'Create a list' : undefined}
aria-label={role === 'dialog' ? 'Create a list' : undefined}
ref={secondaryContainer}
>
<Box as="form" sx={{display: 'flex', flexDirection: 'column', p: 3}}>
Expand Down Expand Up @@ -452,7 +452,7 @@ export const MemexIssueOverlay = ({role}: OverlayProps) => {
left="calc(100vw - 350px)"
role={role}
aria-modal={role === 'dialog' ? 'true' : undefined}
aria-label={role === 'list' ? 'Draft issue editor' : undefined}
aria-label={role === 'dialog' ? 'Draft issue editor' : undefined}
ref={containerRef}
>
<Box sx={{p: 4, height: '100vh', width: '350px'}}>
Expand Down Expand Up @@ -566,7 +566,7 @@ export const PositionedOverlays = ({right, role}: OverlayProps) => {
anchorSide="inside-right"
role={role}
aria-modal={role === 'dialog' ? 'true' : undefined}
aria-label={role === 'list' ? 'Left aligned overlay' : undefined}
aria-label={role === 'dialog' ? 'Left aligned overlay' : undefined}
ref={containerRef}
>
<Box
Expand Down Expand Up @@ -611,7 +611,7 @@ export const PositionedOverlays = ({right, role}: OverlayProps) => {
position="fixed"
role={role}
aria-modal={role === 'dialog' ? 'true' : undefined}
aria-label={role === 'list' ? 'Right aligned overlay' : undefined}
aria-label={role === 'dialog' ? 'Right aligned overlay' : undefined}
ref={containerRef}
>
<Box
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/Overlay/Overlay.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ export const Playground = (args: Args) => {
width={args.width}
height={args.height}
aria-modal={args.role === 'dialog'}
aria-label={args.role === 'list' ? 'Sample overlay' : undefined}
aria-label={args.role === 'dialog' ? 'Sample overlay' : undefined}
ref={containerRef}
{...args}
>
Expand Down

0 comments on commit 0e3d4d8

Please sign in to comment.