Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[notice] removed critical notification label from notice with warning theme #1471

Merged
merged 4 commits into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
230 changes: 118 additions & 112 deletions semcore/notice-global/CHANGELOG.md

Large diffs are not rendered by default.

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
6 changes: 6 additions & 0 deletions semcore/notice/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/).

## [5.36.1] - 2024-06-27

### Fixed

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

## [5.36.0] - 2024-07-05

### Changed
Expand Down
2 changes: 1 addition & 1 deletion semcore/notice/src/Notice.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class RootNotice extends Component {
backgroundColor={color}
role='region'
aria-live={ariaLive}
aria-label={getI18nText(isAssertive ? 'criticalNotification' : 'notification')}
aria-label={getI18nText(theme === 'danger' ? 'criticalNotification' : 'notification')}
>
<Children />
</SNotice>,
Expand Down
3 changes: 2 additions & 1 deletion website/docs/components/notice-global/notice-global-a11y.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ 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. |
| `NoticeGlobal.CloseIcon` | `aria-label="Close notification"` | Defines the default accessible name for the **Close** button. |

## Considerations for developers

Expand Down
2 changes: 1 addition & 1 deletion website/docs/components/notice/notice-a11y.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Table: Roles & attributes
| Component | Attribute | Usage |
| ------------------ | ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Notice` | `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. |
| `Notice` | `aria-label="Notification"` | Defines a default accessible name for the region. |
| `Notice` | `aria-label` | Defines a default accessible name for the region: `"Notification"` for **info**, **success** and **warning** themes, and `"Critical notification"` for **danger** theme. |
| `Notice` | `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. |
| `Notice` | `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. |
| `Notice.CloseIcon` | `aria-label="Close notification"` | Defines the default accessible name for the **Close** button. |
Expand Down
Loading