momentum-design / momentum-ui

Momentum UI is a collection of UI libraries for implementing Momentum Design into web applications and websites.
https://momentum.design
MIT License
199 stars 204 forks source link

fix(CX-13612) : added ariaLive prop in button #1582

Closed niti-owner closed 6 months ago

niti-owner commented 6 months ago

Description

Added new prop ariaLive in button, the prop will be rendered only if passed.

Related Issue

Motivation and Context

aria-live is used by Assistive technologies to announce dynamic changes in the content.

How Has This Been Tested?

1) Added UTs 2) Added sandbox example

Screenshots:

Before (If applicable):

After: When ariaLive is passed:

Screenshot 2024-03-27 at 6 18 00 PM

When ariaLive is not passed:

Screenshot 2024-03-27 at 6 17 48 PM

Types of changes

Checklist:

codecov[bot] commented 6 months ago

Codecov Report

Attention: Patch coverage is 83.33333% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 94.33%. Comparing base (b73c360) to head (5919b66). Report is 205 commits behind head on master.

:exclamation: Current head 5919b66 differs from pull request most recent head 8a4f294. Consider uploading reports for the commit 8a4f294 to get more accurate results

Files Patch % Lines
web-components/src/components/button/Button.ts 83.33% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1582 +/- ## ========================================== + Coverage 94.02% 94.33% +0.31% ========================================== Files 132 134 +2 Lines 18176 19146 +970 Branches 2769 2952 +183 ========================================== + Hits 17090 18062 +972 + Misses 1086 1084 -2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.