diff --git a/semcore/notice-global/CHANGELOG.md b/semcore/notice-global/CHANGELOG.md index a56e1fec13..a59379ed92 100644 --- a/semcore/notice-global/CHANGELOG.md +++ b/semcore/notice-global/CHANGELOG.md @@ -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 diff --git a/semcore/notice-global/src/NoticeGlobal.jsx b/semcore/notice-global/src/NoticeGlobal.jsx index b9ed94138e..a9e891cd07 100644 --- a/semcore/notice-global/src/NoticeGlobal.jsx +++ b/semcore/notice-global/src/NoticeGlobal.jsx @@ -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 ? ( diff --git a/website/docs/components/notice-global/notice-global-a11y.md b/website/docs/components/notice-global/notice-global-a11y.md index 419e9d18bf..5cbfda0776 100644 --- a/website/docs/components/notice-global/notice-global-a11y.md +++ b/website/docs/components/notice-global/notice-global-a11y.md @@ -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. |