Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overlay: Add accessible names to Overlay dialog examples #5186

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions packages/react/src/Overlay/Overlay.features.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ export const DialogOverlay = ({anchorSide, role}: OverlayProps) => {
anchorSide={anchorSide}
role={role}
aria-modal={role === 'dialog' ? 'true' : undefined}
aria-label={role === 'dialog' ? 'Confirmation Overlay' : undefined}
ref={containerRef}
>
<Box display="flex" flexDirection="column" p={2}>
Expand Down Expand Up @@ -171,6 +172,7 @@ export const OverlayOnTopOfOverlay = ({anchorSide, role}: OverlayProps) => {
anchorSide={anchorSide}
role={role}
aria-modal={role === 'dialog' ? 'true' : undefined}
aria-label={role === 'dialog' ? 'Primary Overlay' : undefined}
ref={primaryContainer}
preventOverflow={false}
>
Expand All @@ -188,6 +190,7 @@ export const OverlayOnTopOfOverlay = ({anchorSide, role}: OverlayProps) => {
anchorSide={anchorSide}
role={role}
aria-modal={role === 'dialog' ? 'true' : undefined}
aria-label={role === 'dialog' ? 'Secondary Overlay' : undefined}
ref={secondaryContainer}
preventOverflow={false}
>
Expand Down Expand Up @@ -249,6 +252,7 @@ export const MemexNestedOverlays = ({role}: OverlayProps) => {
left={16}
role={role}
aria-modal={role === 'dialog' ? 'true' : undefined}
aria-label={role === 'dialog' ? 'Memex Nested Overlay' : undefined}
ref={containerRef}
preventOverflow={false}
>
Expand Down Expand Up @@ -334,6 +338,7 @@ export const NestedOverlays = ({role}: OverlayProps) => {
ref={primaryContainer}
role={role}
aria-modal={role === 'dialog' ? 'true' : undefined}
aria-label={role === 'dialog' ? 'Nested Overlay' : undefined}
>
<Box sx={{display: 'flex', flexDirection: 'column', py: 2}}>
<Box sx={{paddingX: 3, paddingY: 2}}>
Expand Down Expand Up @@ -375,6 +380,7 @@ export const NestedOverlays = ({role}: OverlayProps) => {
left={64}
role={role}
aria-modal={role === 'dialog' ? 'true' : undefined}
aria-label={role === 'dialog' ? 'Create List Overlay' : undefined}
ref={secondaryContainer}
>
<Box as="form" sx={{display: 'flex', flexDirection: 'column', p: 3}}>
Expand Down Expand Up @@ -446,6 +452,7 @@ export const MemexIssueOverlay = ({role}: OverlayProps) => {
left="calc(100vw - 350px)"
role={role}
aria-modal={role === 'dialog' ? 'true' : undefined}
aria-label={role === 'dialog' ? 'Memex Issue Overlay' : undefined}
ref={containerRef}
>
<Box sx={{p: 4, height: '100vh', width: '350px'}}>
Expand Down Expand Up @@ -559,6 +566,7 @@ export const PositionedOverlays = ({right, role}: OverlayProps) => {
anchorSide="inside-right"
role={role}
aria-modal={role === 'dialog' ? 'true' : undefined}
aria-label={role === 'dialog' ? 'Positioned Overlay' : undefined}
ref={containerRef}
>
<Box
Expand Down Expand Up @@ -603,6 +611,7 @@ export const PositionedOverlays = ({right, role}: OverlayProps) => {
position="fixed"
role={role}
aria-modal={role === 'dialog' ? 'true' : undefined}
aria-label={role === 'dialog' ? 'Positioned Overlay' : undefined}
ref={containerRef}
>
<Box
Expand Down
Loading