Skip to content

Commit

Permalink
docs(ui): explain Modal action a11y
Browse files Browse the repository at this point in the history
  • Loading branch information
eventualbuddha authored Mar 2, 2022
1 parent 5d82368 commit f20820a
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 f20820a

Please sign in to comment.