Skip to content

Commit

Permalink
[notice-global] removed critical notification label from warning theme
Browse files Browse the repository at this point in the history
  • Loading branch information
msereniti committed Jul 3, 2024
1 parent 28bc008 commit 39d32fa
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions semcore/notice-global/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).

## [2.45.1] - 2024-06-27

### Fixed

- Notice only with `danger` theme has aria-label "Critical Notification" (`warning` theme gets "Notification" as all other themes).

## [2.45.0] - 2024-06-19

### Changed
Expand Down
2 changes: 1 addition & 1 deletion semcore/notice-global/src/NoticeGlobal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class NoticeGlobalRoot extends Component {
backgroundColor={color}
role='region'
aria-live={isAssertive ? 'assertive' : 'polite'}
aria-label={getI18nText(isAssertive ? 'criticalNotification' : 'notification')}
aria-label={getI18nText(theme === 'danger' ? 'criticalNotification' : 'notification')}
>
{advancedMode ? (
<Children />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Table: Roles & attributes
| Component | Attribute | Usage |
| ------------------------- | ---------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `NoticeGlobal` | `role="region"` | Defines an ARIA landmark and allows users to navigate to the component easily and to have it listed in a summary of the page. |
| `NoticeGlobal` | `aria-label` | Defines a default accessible name for the region: `"Notification"` for **info**, **success** and **warning** themes, and `"Critical notification"` for **danger** theme. |
| `NoticeGlobal` | `aria-live="polite"` | Defines a region which receives updates that are important for the user to receive, but not so rapid as to be annoying. The screen reader will speak changes whenever the user is idle. |
| `NoticeGlobal` | `aria-live="assertive"` (only for `warning` and `danger` themes) | Tells assistive technologies to interrupt other processes to provide users with immediate notification of container changes. |
| `NoticeGlobal.CloseIcon` | `aria-label="Close"` | Defines the default accessible name for the **Close** button. |
Expand Down

0 comments on commit 39d32fa

Please sign in to comment.