You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const alerts = [...alertList].map(element => new oudsWeb.Alert(element))`} />
657
655
658
656
<Callouttype="info">
659
657
For the sole purpose of dismissing an alert, it isn’t necessary to initialize the component manually via the JS API, unless you want to use one of our [methods](#methods). By making use of `data-bs-dismiss="alert"`, the component will be initialized automatically and properly dismissed.
You can create an alert instance with the alert constructor, for example:
673
671
674
-
```js
675
-
constbsAlert=newoudsWeb.Alert('#myAlert')
676
-
```
672
+
<CodebuttonLabel="alert instance creation"lang="js"code={`const bsAlert = new oudsWeb.Alert('#myAlert')`} />
677
673
678
674
This makes an alert listen for click events on descendant elements which have the `data-bs-dismiss="alert"` attribute. (Not necessary when using the data-api’s auto-initialization.)
679
675
@@ -688,10 +684,8 @@ This makes an alert listen for click events on descendant elements which have th
Copy file name to clipboardExpand all lines: site/src/content/docs/components/badges.mdx
+19-21Lines changed: 19 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -93,7 +93,7 @@ Badge is displayed as a coloured shape, without an icon, text, or number; its se
93
93
If the context does not allow visually impaired or blind users to understand the meaning, add a `.visually-hidden` text associated with the badge. [Read more about badges accessibility here](#accessibility).
@@ -104,7 +104,7 @@ Badge is displayed as a coloured shape, without an icon, text, or number; its se
104
104
105
105
Non-functional badges are used to display neutral or accent information without carrying a specific functional meaning (unlike functional badges, see below).
106
106
107
-
<Exampleclass="d-flex gap-large"code={`<p class="badge badge-neutral"><span class="visually-hidden">To be noted</span></p>
107
+
<ExamplebuttonLabel="non-functional badges"class="d-flex gap-large"code={`<p class="badge badge-neutral"><span class="visually-hidden">To be noted</span></p>
@@ -115,14 +115,14 @@ Functional badges carry a clear meaning related to the status of an object or sy
115
115
Keep in mind that color should not be the only way to convey information. Functional badges, which have a strong meaning, should not be combined, because some users cannot differentiate colors between them, for example colorblind people. In this case, it is preferable to use an icon as a second way to convey information, associated with a `.visually-hidden` text (required for screen reader users). [Read more about badges accessibility here](#accessibility).
@@ -146,7 +146,7 @@ Here is a valid example of use of functional badges:
146
146
147
147
The disabled state of a badge appears visually muted to signal that it is not currently active or relevant. To make a disabled badge, simply add the `.badge-disabled` class. Depending on the use case, the `.visually-hidden` text may be unnecessary or require adaptation.
@@ -173,7 +173,7 @@ Badge - count is displayed as a coloured shape that shows numerical values, and
173
173
If the number itself is not meaningful in the context, add a `.visually-hidden` text associated with the badge - count. [Read more about badges accessibility here](#accessibility).
@@ -188,7 +188,7 @@ Badges - count can be used with non-functional or functional colors.
188
188
Keep in mind that color should not be the only way to convey information. If the color has a strong meaning, especially in functional statuses, reflect that meaning in the `.visually hidden` text associated with the badge - count. [Read more about badges accessibility here](#accessibility).
@@ -201,7 +201,7 @@ Badges - count can be used with non-functional or functional colors.
201
201
202
202
The disabled state of a badge - count appears visually muted to signal that it is not currently active or relevant. To make a disabled badge - count, simply add the `.badge-disabled` class. Depending on the use case, the `.visually-hidden` text may require adaptation.
@@ -227,7 +227,7 @@ Badge - icon is presented as a coloured shape that displays an icon, and its sel
227
227
Badges - icon should always be associated to a `.visually-hidden` text describing the icon's meaning. [Read more about badges accessibility here](#accessibility).
@@ -250,7 +250,7 @@ Badge - icon is presented as a coloured shape that displays an icon, and its sel
250
250
251
251
Non-functional badges - icon are used to display neutral or accent information without carrying a specific functional meaning (unlike functional badges, see below), reinforced by an icon.
@@ -279,7 +279,7 @@ Functional badges - icon carry a clear meaning related to the status of an objec
279
279
Keep in mind that color and icon should not be the only ways to convey information. In functional badges, the color and icon have a strong meaning, it must be reflected in the badge's `.visually-hidden` associated text. [Read more about tags accessibility here](#accessibility).
@@ -302,7 +302,7 @@ Functional badges - icon carry a clear meaning related to the status of an objec
302
302
303
303
The disabled state of a badge - icon appears visually muted to signal that it is not currently active or relevant. To make a disabled badge - icon, simply add the `.badge-disabled` class. Depending on the use case, the `.visually-hidden` text may be unnecessary or require adaptation.
0 commit comments