vmware-archive / clarity

Clarity is a scalable, accessible, customizable, open source design system built with web components. Works with any JavaScript framework, built for enterprises, and designed to be inclusive.
http://clarity.design
MIT License
6.43k stars 763 forks source link

fix: only focus on modal body if scrollable #6546

Closed steve-haar closed 2 years ago

steve-haar commented 2 years ago

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

What is the current behavior?

A modal body will always have a tab index, even if the body is not scrollable.

Issue Number: N/A closes https://github.com/vmware/clarity/pull/6493

What is the new behavior?

A modal body should only have a tab index if the content is tall enough to make the body scrollable. If the content is not tall enough, then the modal body is not operable and should not have a tab index.

Does this PR introduce a breaking change?

Other information

vmwclabot commented 2 years ago

@steve-haar, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding Signed-off-by: John Doe <john.doe@email.org> to the last line of each Git commit message. The e-mail address used to sign must match the e-mail address of the Git author. Click here to view the Developer Certificate of Origin agreement.

netlify[bot] commented 2 years ago

✔️ Deploy Preview for zzz-angular-clarity-design-old ready!

🔨 Explore the source changes: 4af1d5edb9de60ee42389b8e6e5c92d6c61097b7

🔍 Inspect the deploy log: https://app.netlify.com/sites/zzz-angular-clarity-design-old/deploys/61d4b92909af2600082c99de

😎 Browse the preview: https://deploy-preview-6546--zzz-angular-clarity-design-old.netlify.app