Skip to content

Commit

Permalink
Merge pull request #1459 from votingworks/docs/ui/modal-a11y
Browse files Browse the repository at this point in the history
docs(ui): explain `Modal` action a11y
  • Loading branch information
eventualbuddha authored Mar 7, 2022
2 parents 5855dc3 + f20820a commit 9704cc7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions libs/ui/src/modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@ interface Props {
* "Save") should be first under a fragment, and the secondary actions (such
* as "Cancel") should be after that in the order they should be presented
* from left to right.
*
* This ordering is primarily for accessibility. The primary action being
* first makes it the easiest one to activate when using an accessible
* controller. The first secondary action is likely a cancellation or
* dismissal action and is still common, albeit less than the primary
* action. Further actions are likely a variation on the primary action
* (such as "Save As") and are less common.
*/
actions?: ReactNode;
onAfterOpen?: () => void;
Expand Down

0 comments on commit 9704cc7

Please sign in to comment.