@aurodesignsystem-dev/auro-alert 0.0.0-pr124.1 → 0.0.0-pr124.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/demo/api.md CHANGED
@@ -16,13 +16,13 @@ Shows an inline message that gives feedback about a user action, such as an erro
16
16
 
17
17
  ### Properties and attributes
18
18
 
19
- | Properties | Attributes | Modifiers | Type | Default | Relevant when | Description |
20
- | -------------- | -------------- | --------- | -------------------------------------------------- | ------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
21
- | hidden | hidden | | boolean | | | Hides the alert both visually and from screen readers. |
22
- | hiddenAudible | hiddenAudible | | boolean | | | Hides the alert from screen readers while keeping it visible. |
23
- | hiddenVisually | hiddenVisually | | boolean | | | Hides the alert visually while keeping it available to screen readers. |
24
- | noIcon | noIcon | | boolean | | `type` | Removes the icon from the alert. Applies only when `type` is set, because an alert without a type has no icon. |
25
- | type | type | | `information` \| `error` \| `success` \| `warning` | | | Sets the alert's purpose, which controls its icon and border color: `error`, `warning`, `success`, or `information`. Without a value, the alert shows no icon and uses a default border color. Screen readers announce `error`, `success`, and `warning` alerts right away because they use `role="alert"`, but `information` alerts aren't announced automatically. |
19
+ | Properties | Attributes | Modifiers | Type | Default | Relevant when | Description |
20
+ | -------------- | -------------- | --------- | -------------------------------------------------- | ------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
21
+ | hidden | hidden | | boolean | | | Hides the alert both visually and from screen readers. |
22
+ | hiddenAudible | hiddenAudible | | boolean | | | Hides the alert from screen readers while keeping it visible. |
23
+ | hiddenVisually | hiddenVisually | | boolean | | | Hides the alert visually while keeping it available to screen readers. |
24
+ | noIcon | noIcon | | boolean | | `type` | Removes the icon from the alert. Applies only when `type` is set, because an alert without a type has no icon. |
25
+ | type | type | | `information` \| `error` \| `success` \| `warning` | | | Sets the alert's purpose, which controls its icon and border color: `error`, `warning`, `success`, or `information`. Without a value, the alert shows no icon and uses a default border color. Screen readers announce `error`, `success`, and `warning` alerts right away because they set `role="alert"`, but `information` alerts set no role, so screen readers don't announce them automatically. * |
26
26
 
27
27
  ### Methods
28
28
 
@@ -32,9 +32,9 @@ Shows an inline message that gives feedback about a user action, such as an erro
32
32
 
33
33
  ### Slots
34
34
 
35
- | Name | Description |
36
- | --------- | ---------------------------------------------------------------------------------------- |
37
- | (default) | Provide text for the alert. If using multiple lines, separate each line with `<p>` tags. |
35
+ | Name | Description |
36
+ | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
37
+ | (default) | Provide text for the alert. If using multiple lines, separate each line with `<p>` tags. Screen readers also hear a hidden type label before your text, such as "Warning." for `warning` alerts, so don't repeat the type in your message. |
38
38
 
39
39
  ### CSS shadow parts
40
40
 
@@ -142,7 +142,7 @@ Use the `noIcon` attribute to remove the icon from the alert UI when the `type`
142
142
  <br />
143
143
  <auro-alert noIcon type="success">Your status for Flight 20 to Aruba has been updated.</auro-alert>
144
144
  <br />
145
- <auro-alert noIcon type="warning">Warning. Session timed out. Look for a confirmation email to verify your transaction.</auro-alert>
145
+ <auro-alert noIcon type="warning">Session timed out. Look for a confirmation email to verify your transaction.</auro-alert>
146
146
  <!-- AURO-GENERATED-CONTENT:END -->
147
147
  </div>
148
148
  <auro-accordion alignRight>
@@ -156,13 +156,14 @@ Use the `noIcon` attribute to remove the icon from the alert UI when the `type`
156
156
  &lt;br /&gt;
157
157
  &lt;auro-alert noIcon type="success"&gt;Your status for Flight 20 to Aruba has been updated.&lt;/auro-alert&gt;
158
158
  &lt;br /&gt;
159
- &lt;auro-alert noIcon type="warning"&gt;Warning. Session timed out. Look for a confirmation email to verify your transaction.&lt;/auro-alert&gt;</code></pre>
159
+ &lt;auro-alert noIcon type="warning"&gt;Session timed out. Look for a confirmation email to verify your transaction.&lt;/auro-alert&gt;</code></pre>
160
160
  <!-- AURO-GENERATED-CONTENT:END -->
161
161
  </auro-accordion>
162
162
 
163
163
  ### Type
164
164
 
165
- Use the `type` attribute to apply an icon and border color that match the alert’s purpose. It supports the following values: `error`, `information`, `success`, and `warning`. The `error`, `success`, and `warning` types use `role="alert"`, so screen readers announce them right away. The `information` type doesn't use it, so screen readers don't announce it automatically.
165
+ Use the `type` attribute to apply an icon and border color that match the alert’s purpose. It supports the following values: `error`, `information`, `success`, and `warning`. The `error`, `success`, and `warning` types set `role="alert"`, so screen readers announce them right away. The `information` type sets no role, so screen readers don't announce it automatically.
166
+ Each type also adds a hidden label that screen readers hear before your text, such as "Warning." for `warning` and "Informational notice." for `information`. Don't repeat the type in your message.
166
167
 
167
168
  <div class="exampleWrapper">
168
169
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/type.html) -->
@@ -173,7 +174,7 @@ Use the `type` attribute to apply an icon and border color that match the alert
173
174
  <br />
174
175
  <auro-alert type="success">Your status for Flight 20 to Aruba has been updated.</auro-alert>
175
176
  <br />
176
- <auro-alert type="warning">Warning. Session timed out. Look for a confirmation email to verify your transaction.</auro-alert>
177
+ <auro-alert type="warning">Session timed out. Look for a confirmation email to verify your transaction.</auro-alert>
177
178
  <!-- AURO-GENERATED-CONTENT:END -->
178
179
  </div>
179
180
  <auro-accordion alignRight>
@@ -187,7 +188,7 @@ Use the `type` attribute to apply an icon and border color that match the alert
187
188
  &lt;br /&gt;
188
189
  &lt;auro-alert type="success"&gt;Your status for Flight 20 to Aruba has been updated.&lt;/auro-alert&gt;
189
190
  &lt;br /&gt;
190
- &lt;auro-alert type="warning"&gt;Warning. Session timed out. Look for a confirmation email to verify your transaction.&lt;/auro-alert&gt;</code></pre>
191
+ &lt;auro-alert type="warning"&gt;Session timed out. Look for a confirmation email to verify your transaction.&lt;/auro-alert&gt;</code></pre>
191
192
  <!-- AURO-GENERATED-CONTENT:END -->
192
193
  </auro-accordion>
193
194
 
package/demo/api.min.js CHANGED
@@ -265,7 +265,7 @@ var tokensCss = i$3`:host{--ds-auro-alert-border-color: var(--ds-basic-color-sta
265
265
  * @summary An inline alert with icons and colors for error, success, warning, and information messages.
266
266
  * @customElement auro-alert
267
267
  *
268
- * @slot - Provide text for the alert. If using multiple lines, separate each line with `<p>` tags.
268
+ * @slot - Provide text for the alert. If using multiple lines, separate each line with `<p>` tags. Screen readers also hear a hidden type label before your text, such as "Warning." for `warning` alerts, so don't repeat the type in your message.
269
269
  * @csspart alert - The outer container that holds the icon and the message.
270
270
  * @csspart alert-content - The area next to the icon that holds the alert message.
271
271
  *
@@ -344,8 +344,7 @@ class AuroAlert extends AuroElement {
344
344
  },
345
345
 
346
346
  /**
347
- * Sets the alert's purpose, which controls its icon and border color: `error`, `warning`, `success`, or `information`. Without a value, the alert shows no icon and uses a default border color. Screen readers announce `error`, `success`, and `warning` alerts right away because they use `role="alert"`, but `information` alerts aren't announced automatically.
348
- * @type {'information' | 'error' | 'success' | 'warning'}
347
+ * Sets the alert's purpose, which controls its icon and border color: `error`, `warning`, `success`, or `information`. Without a value, the alert shows no icon and uses a default border color. Screen readers announce `error`, `success`, and `warning` alerts right away because they set `role="alert"`, but `information` alerts set no role, so screen readers don't announce them automatically. * @type {'information' | 'error' | 'success' | 'warning'}
349
348
  */
350
349
  type: {
351
350
  type: String,
@@ -391,31 +390,37 @@ class AuroAlert extends AuroElement {
391
390
  // function that renders the HTML and CSS into the scope of the component
392
391
  render() {
393
392
  let output = u$2``;
393
+ let role;
394
+ let typeStr;
394
395
 
395
396
  switch (this.type) {
396
397
  case undefined:
397
398
  break;
398
399
  case "error":
399
400
  output = this.generateIconHtml("alert", "error-stroke");
400
- this.role = "alert";
401
- this.typeStr = "Error.";
401
+ role = "alert";
402
+ typeStr = "Error.";
402
403
  break;
403
404
  case "success":
404
405
  output = this.generateIconHtml("interface", "check-stroke");
405
- this.role = "alert";
406
- this.typeStr = "Success.";
406
+ role = "alert";
407
+ typeStr = "Success.";
407
408
  break;
408
409
  case "warning":
409
410
  output = this.generateIconHtml("alert", "warning-stroke");
410
- this.role = "alert";
411
- this.typeStr = "Warning.";
411
+ role = "alert";
412
+ typeStr = "Warning.";
412
413
  break;
413
414
  case "information":
414
415
  output = this.generateIconHtml("alert", "information-stroke");
415
- this.typeStr = "Informational notice.";
416
+ typeStr = "Informational notice.";
416
417
  break;
417
418
  }
418
419
 
420
+ // Set both values on every render so they never keep a previous type's role or label
421
+ this.role = role;
422
+ this.typeStr = typeStr;
423
+
419
424
  return u$2`
420
425
  <div part="alert" class="alert"
421
426
  aria-hidden="${this.hideAudible(this.hiddenAudible)}">
package/demo/index.min.js CHANGED
@@ -265,7 +265,7 @@ var tokensCss = i$3`:host{--ds-auro-alert-border-color: var(--ds-basic-color-sta
265
265
  * @summary An inline alert with icons and colors for error, success, warning, and information messages.
266
266
  * @customElement auro-alert
267
267
  *
268
- * @slot - Provide text for the alert. If using multiple lines, separate each line with `<p>` tags.
268
+ * @slot - Provide text for the alert. If using multiple lines, separate each line with `<p>` tags. Screen readers also hear a hidden type label before your text, such as "Warning." for `warning` alerts, so don't repeat the type in your message.
269
269
  * @csspart alert - The outer container that holds the icon and the message.
270
270
  * @csspart alert-content - The area next to the icon that holds the alert message.
271
271
  *
@@ -344,8 +344,7 @@ class AuroAlert extends AuroElement {
344
344
  },
345
345
 
346
346
  /**
347
- * Sets the alert's purpose, which controls its icon and border color: `error`, `warning`, `success`, or `information`. Without a value, the alert shows no icon and uses a default border color. Screen readers announce `error`, `success`, and `warning` alerts right away because they use `role="alert"`, but `information` alerts aren't announced automatically.
348
- * @type {'information' | 'error' | 'success' | 'warning'}
347
+ * Sets the alert's purpose, which controls its icon and border color: `error`, `warning`, `success`, or `information`. Without a value, the alert shows no icon and uses a default border color. Screen readers announce `error`, `success`, and `warning` alerts right away because they set `role="alert"`, but `information` alerts set no role, so screen readers don't announce them automatically. * @type {'information' | 'error' | 'success' | 'warning'}
349
348
  */
350
349
  type: {
351
350
  type: String,
@@ -391,31 +390,37 @@ class AuroAlert extends AuroElement {
391
390
  // function that renders the HTML and CSS into the scope of the component
392
391
  render() {
393
392
  let output = u$2``;
393
+ let role;
394
+ let typeStr;
394
395
 
395
396
  switch (this.type) {
396
397
  case undefined:
397
398
  break;
398
399
  case "error":
399
400
  output = this.generateIconHtml("alert", "error-stroke");
400
- this.role = "alert";
401
- this.typeStr = "Error.";
401
+ role = "alert";
402
+ typeStr = "Error.";
402
403
  break;
403
404
  case "success":
404
405
  output = this.generateIconHtml("interface", "check-stroke");
405
- this.role = "alert";
406
- this.typeStr = "Success.";
406
+ role = "alert";
407
+ typeStr = "Success.";
407
408
  break;
408
409
  case "warning":
409
410
  output = this.generateIconHtml("alert", "warning-stroke");
410
- this.role = "alert";
411
- this.typeStr = "Warning.";
411
+ role = "alert";
412
+ typeStr = "Warning.";
412
413
  break;
413
414
  case "information":
414
415
  output = this.generateIconHtml("alert", "information-stroke");
415
- this.typeStr = "Informational notice.";
416
+ typeStr = "Informational notice.";
416
417
  break;
417
418
  }
418
419
 
420
+ // Set both values on every render so they never keep a previous type's role or label
421
+ this.role = role;
422
+ this.typeStr = typeStr;
423
+
419
424
  return u$2`
420
425
  <div part="alert" class="alert"
421
426
  aria-hidden="${this.hideAudible(this.hiddenAudible)}">
@@ -23,13 +23,13 @@ import{unsafeStatic as e,literal as t,html as r}from"lit/static-html.js";import{
23
23
  `}}class f{generateElementName(e,t){let r=e;return r+="-",r+=t.replace(/[.]/g,"_"),r}generateTag(r,a,o){const s=this.generateElementName(r,a),i=t`${e(s)}`;return customElements.get(s)||customElements.define(s,class extends o{}),i}}class b{registerComponent(e,t){customElements.get(e)||customElements.define(e,class extends t{})}closestElement(e,t=this,r=(t,a=t&&t.closest(e))=>t&&t!==document&&t!==window?a||r(t.getRootNode().host):null){return r(t)}handleComponentTagRename(e,t){const r=t.toLowerCase();e.tagName.toLowerCase()!==r&&e.setAttribute(r,!0)}elementMatch(e,t){const r=t.toLowerCase();return e.tagName.toLowerCase()===r||e.hasAttribute(r)}getSlotText(e,t){const r=e.shadowRoot?.querySelector(`slot[name="${t}"]`);return(r?.assignedNodes({flatten:!0})||[]).map(e=>e.textContent?.trim()).join(" ").trim()||null}}class y extends s{static get properties(){return{hidden:{type:Boolean,reflect:!0},hiddenVisually:{type:Boolean,reflect:!0},hiddenAudible:{type:Boolean,reflect:!0}}}hideAudible(e){return e?"true":"false"}}var w=a`.alert{border-color:var(--ds-auro-alert-border-color);background-color:var(--ds-auro-alert-container-color);color:var(--ds-auro-alert-text-color)}[auro-icon]{color:var(--ds-auro-alert-icon-color)}:host([type=error]){--ds-auro-alert-border-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-alert-icon-color: var(--ds-basic-color-status-error, #e31f26)}:host([type=warning]){--ds-auro-alert-border-color: var(--ds-basic-color-status-warning, #fac200);--ds-auro-alert-icon-color: var(--ds-basic-color-status-warning, #fac200)}:host([type=information]){--ds-auro-alert-border-color: var(--ds-basic-color-status-info, #01426a);--ds-auro-alert-icon-color: var(--ds-basic-color-status-info, #01426a)}:host([type=success]){--ds-auro-alert-border-color: var(--ds-basic-color-status-success, #447a1f);--ds-auro-alert-icon-color: var(--ds-basic-color-status-success, #447a1f)}
24
24
  `,x=a`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px,1px,1px,1px);width:1px;height:1px;padding:0;border:0}.alert{display:flex;padding:var(--ds-size-100, .5rem);padding-right:var(--ds-size-200, 1rem);padding-left:var(--ds-size-150, .75rem);border-width:1px;border-style:solid;border-radius:var(--ds-border-radius, .375rem);border-left-width:var(--ds-size-100, .5rem)}[auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem);margin-right:var(--ds-size-100, .5rem)}.content{width:-webkit-fill-available}
25
25
  `,k=a`:host{--ds-auro-alert-border-color: var(--ds-basic-color-status-default, #afb9c6);--ds-auro-alert-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-alert-icon-color: transparent;--ds-auro-alert-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}
26
- `;class S extends y{constructor(){super();const e=new f;this.iconTag=e.generateTag("auro-icon","9.2.1",g),this.runtimeUtils=new b}static get properties(){return{...y.properties,hidden:{type:Boolean,reflect:!0},hiddenAudible:{type:Boolean,reflect:!0},hiddenVisually:{type:Boolean,reflect:!0},iconTag:{type:String},noIcon:{type:Boolean,reflect:!0},role:{type:String,reflect:!0},type:{type:String,attribute:"type",reflect:!0}}}static get styles(){return[x,w,k]}static register(e="auro-alert"){b.prototype.registerComponent(e,S)}firstUpdated(){this.runtimeUtils.handleComponentTagRename(this,"auro-alert")}generateIconHtml(e,t){return this.noIcon?r``:r`<${this.iconTag} customColor category="${e}" name="${t}"></${this.iconTag}>`}render(){let e=r``;switch(this.type){case void 0:break;case"error":e=this.generateIconHtml("alert","error-stroke"),this.role="alert",this.typeStr="Error.";break;case"success":e=this.generateIconHtml("interface","check-stroke"),this.role="alert",this.typeStr="Success.";break;case"warning":e=this.generateIconHtml("alert","warning-stroke"),this.role="alert",this.typeStr="Warning.";break;case"information":e=this.generateIconHtml("alert","information-stroke"),this.typeStr="Informational notice."}return r`
26
+ `;class _ extends y{constructor(){super();const e=new f;this.iconTag=e.generateTag("auro-icon","9.2.1",g),this.runtimeUtils=new b}static get properties(){return{...y.properties,hidden:{type:Boolean,reflect:!0},hiddenAudible:{type:Boolean,reflect:!0},hiddenVisually:{type:Boolean,reflect:!0},iconTag:{type:String},noIcon:{type:Boolean,reflect:!0},role:{type:String,reflect:!0},type:{type:String,attribute:"type",reflect:!0}}}static get styles(){return[x,w,k]}static register(e="auro-alert"){b.prototype.registerComponent(e,_)}firstUpdated(){this.runtimeUtils.handleComponentTagRename(this,"auro-alert")}generateIconHtml(e,t){return this.noIcon?r``:r`<${this.iconTag} customColor category="${e}" name="${t}"></${this.iconTag}>`}render(){let e,t,a=r``;switch(this.type){case void 0:break;case"error":a=this.generateIconHtml("alert","error-stroke"),e="alert",t="Error.";break;case"success":a=this.generateIconHtml("interface","check-stroke"),e="alert",t="Success.";break;case"warning":a=this.generateIconHtml("alert","warning-stroke"),e="alert",t="Warning.";break;case"information":a=this.generateIconHtml("alert","information-stroke"),t="Informational notice."}return this.role=e,this.typeStr=t,r`
27
27
  <div part="alert" class="alert"
28
28
  aria-hidden="${this.hideAudible(this.hiddenAudible)}">
29
- ${e}
29
+ ${a}
30
30
  <div part="alert-content" class="content body-lg">
31
31
  <span class="util_displayHiddenVisually">${this.typeStr}</span>
32
32
  <slot></slot>
33
33
  </div>
34
34
  </div>
35
- `}}export{S as A};
35
+ `}}export{_ as A};
package/dist/index.d.ts CHANGED
@@ -85,7 +85,7 @@ export type AuroAlertProps = {
85
85
  hiddenVisually?: AuroAlert["hiddenVisually"];
86
86
  /** Removes the icon from the alert. Applies only when `type` is set, because an alert without a type has no icon. */
87
87
  noIcon?: AuroAlert["noIcon"];
88
- /** Sets the alert's purpose, which controls its icon and border color: `error`, `warning`, `success`, or `information`. Without a value, the alert shows no icon and uses a default border color. Screen readers announce `error`, `success`, and `warning` alerts right away because they use `role="alert"`, but `information` alerts aren't announced automatically. */
88
+ /** Sets the alert's purpose, which controls its icon and border color: `error`, `warning`, `success`, or `information`. Without a value, the alert shows no icon and uses a default border color. Screen readers announce `error`, `success`, and `warning` alerts right away because they set `role="alert"`, but `information` alerts set no role, so screen readers don't announce them automatically. * */
89
89
  type?: AuroAlert["type"];
90
90
  };
91
91
 
@@ -98,7 +98,7 @@ export type AuroAlertSolidJsProps = {
98
98
  "prop:hiddenVisually"?: AuroAlert["hiddenVisually"];
99
99
  /** Removes the icon from the alert. Applies only when `type` is set, because an alert without a type has no icon. */
100
100
  "prop:noIcon"?: AuroAlert["noIcon"];
101
- /** Sets the alert's purpose, which controls its icon and border color: `error`, `warning`, `success`, or `information`. Without a value, the alert shows no icon and uses a default border color. Screen readers announce `error`, `success`, and `warning` alerts right away because they use `role="alert"`, but `information` alerts aren't announced automatically. */
101
+ /** Sets the alert's purpose, which controls its icon and border color: `error`, `warning`, `success`, or `information`. Without a value, the alert shows no icon and uses a default border color. Screen readers announce `error`, `success`, and `warning` alerts right away because they set `role="alert"`, but `information` alerts set no role, so screen readers don't announce them automatically. * */
102
102
  "prop:type"?: AuroAlert["type"];
103
103
 
104
104
  /** Set the innerHTML of the element */
@@ -130,13 +130,13 @@ export type CustomElements = {
130
130
  * - `hiddenAudible`: Hides the alert from screen readers while keeping it visible.
131
131
  * - `hiddenVisually`: Hides the alert visually while keeping it available to screen readers.
132
132
  * - `noIcon`: Removes the icon from the alert. Applies only when `type` is set, because an alert without a type has no icon.
133
- * - `type`: Sets the alert's purpose, which controls its icon and border color: `error`, `warning`, `success`, or `information`. Without a value, the alert shows no icon and uses a default border color. Screen readers announce `error`, `success`, and `warning` alerts right away because they use `role="alert"`, but `information` alerts aren't announced automatically.
133
+ * - `type`: Sets the alert's purpose, which controls its icon and border color: `error`, `warning`, `success`, or `information`. Without a value, the alert shows no icon and uses a default border color. Screen readers announce `error`, `success`, and `warning` alerts right away because they set `role="alert"`, but `information` alerts set no role, so screen readers don't announce them automatically. *
134
134
  *
135
135
  * ## Slots
136
136
  *
137
137
  * Areas where markup can be added to the component.
138
138
  *
139
- * - `(default)`: Provide text for the alert. If using multiple lines, separate each line with `<p>` tags.
139
+ * - `(default)`: Provide text for the alert. If using multiple lines, separate each line with `<p>` tags. Screen readers also hear a hidden type label before your text, such as "Warning." for `warning` alerts, so don't repeat the type in your message.
140
140
  *
141
141
  * ## Methods
142
142
  *
@@ -186,13 +186,13 @@ export type CustomElementsSolidJs = {
186
186
  * - `hiddenAudible`: Hides the alert from screen readers while keeping it visible.
187
187
  * - `hiddenVisually`: Hides the alert visually while keeping it available to screen readers.
188
188
  * - `noIcon`: Removes the icon from the alert. Applies only when `type` is set, because an alert without a type has no icon.
189
- * - `type`: Sets the alert's purpose, which controls its icon and border color: `error`, `warning`, `success`, or `information`. Without a value, the alert shows no icon and uses a default border color. Screen readers announce `error`, `success`, and `warning` alerts right away because they use `role="alert"`, but `information` alerts aren't announced automatically.
189
+ * - `type`: Sets the alert's purpose, which controls its icon and border color: `error`, `warning`, `success`, or `information`. Without a value, the alert shows no icon and uses a default border color. Screen readers announce `error`, `success`, and `warning` alerts right away because they set `role="alert"`, but `information` alerts set no role, so screen readers don't announce them automatically. *
190
190
  *
191
191
  * ## Slots
192
192
  *
193
193
  * Areas where markup can be added to the component.
194
194
  *
195
- * - `(default)`: Provide text for the alert. If using multiple lines, separate each line with `<p>` tags.
195
+ * - `(default)`: Provide text for the alert. If using multiple lines, separate each line with `<p>` tags. Screen readers also hear a hidden type label before your text, such as "Warning." for `warning` alerts, so don't repeat the type in your message.
196
196
  *
197
197
  * ## Methods
198
198
  *
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export{A as AuroAlert}from"./auro-alert-BUDoiSly.js";import"lit/static-html.js";import"lit";import"lit/directives/class-map.js";import"lit/directives/if-defined.js";
1
+ export{A as AuroAlert}from"./auro-alert-DU6GmtY8.js";import"lit/static-html.js";import"lit";import"lit/directives/class-map.js";import"lit/directives/if-defined.js";
@@ -1 +1 @@
1
- import{A as i}from"./auro-alert-BUDoiSly.js";import"lit/static-html.js";import"lit";import"lit/directives/class-map.js";import"lit/directives/if-defined.js";i.register();
1
+ import{A as i}from"./auro-alert-DU6GmtY8.js";import"lit/static-html.js";import"lit";import"lit/directives/class-map.js";import"lit/directives/if-defined.js";i.register();
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "================================================================================"
9
9
  ],
10
10
  "name": "@aurodesignsystem-dev/auro-alert",
11
- "version": "0.0.0-pr124.1",
11
+ "version": "0.0.0-pr124.3",
12
12
  "description": "auro-alert HTML custom element",
13
13
  "repository": {
14
14
  "type": "git",