Skip to content

Commit

Permalink
fix: Example Body Content Overflow with support for keyboard scroll (#…
Browse files Browse the repository at this point in the history
…2225)

Fixes: #2222  

Keyboard accessibility: the scrollable area in the Body Content Overflow example of a modal could not be scrolled up/down using the keyboard only.

[category:Component Examples]

Release Note:
Adding tabIndex 0 to Modal.Body will allow for content to be accessible and scrollable if the content overflows

Co-authored-by: @mannycarrera4 <mannycarrera4@users.noreply.github.com>
  • Loading branch information
williamjstanton and mannycarrera4 committed May 22, 2023
1 parent 41766d8 commit 7094e14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/react/modal/stories/examples/BodyOverflow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const BodyOverflow = () => {
<Modal.Card>
<Modal.CloseIcon aria-label="Close" />
<Modal.Heading>MIT License</Modal.Heading>
<Modal.Body>
<Modal.Body tabIndex={0}>
<p style={{marginTop: 0}}>
Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the "Software"), to deal in the Software
Expand Down

0 comments on commit 7094e14

Please sign in to comment.