@aurodesignsystem/auro-dialog 4.2.2 → 4.2.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/CHANGELOG.md CHANGED
@@ -1,9 +1,8 @@
1
- ## [4.2.2](https://github.com/AlaskaAirlines/auro-dialog/compare/v4.2.1...v4.2.2) (2026-10-06)
1
+ ## [4.2.3](https://github.com/AlaskaAirlines/auro-dialog/compare/v4.2.2...v4.2.3) (2026-11-18)
2
2
 
3
+ ### Performance Improvements
3
4
 
4
- ### Bug Fixes
5
-
6
- * restore page scroll lock behind non-modal dialogs AB[#1625424](https://github.com/AlaskaAirlines/auro-dialog/issues/1625424) ([56c2f89](https://github.com/AlaskaAirlines/auro-dialog/commit/56c2f8944b170043f95509a97ec6bb9f5276706f)), closes [AB#1647843](https://github.com/AB/issues/1647843)
5
+ * export CEM AB[#1668016](https://github.com/AlaskaAirlines/auro-dialog/issues/1668016) ([49b4e8d](https://github.com/AlaskaAirlines/auro-dialog/commit/49b4e8d3413ddc81ccd69cba03389437245c0882))
7
6
 
8
7
  # Semantic Release Automated Changelog
9
8
 
package/README.md CHANGED
@@ -12,31 +12,32 @@ The following sections are editable by making changes to the following files:
12
12
  | SECTION | DESCRIPTION | FILE LOCATION |
13
13
  |------------------------|---------------------------------------------------|-------------------------------------|
14
14
  | Description | Description of the component | `./docs/partials/description.md` |
15
- | Use Cases | Examples for when to use this component | `./docs/partials/useCases.md` |
16
- | Additional Information | For use to add any component specific information | `./docs/partials/readmeAddlInfo.md` |
17
- | Component Example Code | HTML sample code of the components use | `./apiExamples/basic.html` |
15
+ | Use cases | Examples for when to use this component | `./docs/partials/useCases.md` |
16
+ | Additional information | For use to add any component specific information | `./docs/partials/readmeAddlInfo.md` |
17
+ | Component example code | HTML sample code of the components use | `./apiExamples/basic.html` |
18
18
  -->
19
19
 
20
20
  # Dialog
21
21
 
22
22
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/description.md) -->
23
23
  <!-- The below content is automatically added from ./docs/partials/description.md -->
24
- <p>The <code>&lt;auro-dialog&gt;</code> component is an intrusive interactive component, not passive. The component is best used when there is a requirement the user be made aware of the content being shown, moving focus from the main content to the dialog content.</p>
25
- <p>The component also supports a modal (blocking) state where the user must interact with the content of the component in order to continue. Passive dismissal of the content is not allowed. Users of this state must add a trigger for the user to move beyond this content.</p>
26
- <p>Auro holds the opinions of the <a class="hyperlink" href="https://www.nngroup.com/articles/modal-nonmodal-dialog/" target="_blank">Nielsen Norman Group</a> on dialog and modal use to be true.</p>
24
+ <p>The <code>&lt;auro-dialog&gt;</code> component interrupts the page and moves focus into the dialog. Use it when people need to notice the content right away.</p>
25
+
26
+ <p>Use <code>modal</code> when people must act before they continue. A modal dialog can't be dismissed passively, so add a footer button that closes it.</p>
27
+ <p>Auro follows the <a class="hyperlink" href="https://www.nngroup.com/articles/modal-nonmodal-dialog/" target="_blank">Nielsen Norman Group</a>'s guidance on dialogs and modals.</p>
27
28
  <!-- AURO-GENERATED-CONTENT:END -->
28
29
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/readmeAddlInfo.md) -->
29
30
  <!-- The below content is automatically added from ./docs/partials/readmeAddlInfo.md -->
30
31
  <!-- AURO-GENERATED-CONTENT:END -->
31
32
 
32
- ## Use Cases
33
+ ## Use cases
33
34
 
34
35
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/useCases.md) -->
35
36
  <!-- The below content is automatically added from ./docs/partials/useCases.md -->
36
- <p>The <code>&lt;auro-dialog&gt;</code> component should be used in situations where users may:</p>
37
+ <p>Use <code>&lt;auro-dialog&gt;</code> when people need to:</p>
37
38
  <ul>
38
- <li>Be prompted to take an action before doing anything else or going back</li>
39
- <li>Be prompted to view content with the option of closing it</li>
39
+ <li>Take an action before they do anything else or go back</li>
40
+ <li>View content that they can close when they're done</li>
40
41
  </ul>
41
42
  <!-- AURO-GENERATED-CONTENT:END -->
42
43
 
@@ -52,10 +53,10 @@ The following sections are editable by making changes to the following files:
52
53
 
53
54
  <!-- AURO-GENERATED-CONTENT:END -->
54
55
 
55
- ### Define Dependency in Project
56
+ ### Define dependency in project
56
57
 
57
58
  <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentImportDescription.md) -->
58
- Defining the dependency within each project that is using the `<auro-dialog>` component.
59
+ Import the component in each project that uses `<auro-dialog>`.
59
60
 
60
61
  <!-- AURO-GENERATED-CONTENT:END -->
61
62
  <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentImport.md) -->
@@ -67,22 +68,22 @@ Defining the dependency within each project that is using the `<auro-dialog>` co
67
68
  ### Use CDN
68
69
 
69
70
  <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/bundleInstallDescription.md) -->
70
- In cases where the project is not able to process JS assets, there are pre-processed assets available for use. Legacy browsers such as IE11 are no longer supported.
71
+ If your project can't process JS assets, use the pre-processed assets. Legacy browsers, such as IE11, aren't supported.
71
72
 
72
- <pre class="language-html"><code class="language-html">&lt;script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-dialog@latest/+esm"&gt;&lt;/script&gt;</code></pre>
73
+ <pre class="language-html"><code class="language-html">&lt;script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-dialog@latest/+esm"&gt;&lt;/script&gt;</code></pre>
73
74
 
74
75
  <!-- AURO-GENERATED-CONTENT:END -->
75
76
 
76
- ## Basic Example
77
+ ## Basic example
77
78
 
78
79
  <!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/basic.html) -->
79
80
  <!-- The below code snippet is automatically added from ./apiExamples/basic.html -->
80
81
 
81
82
  <pre class="language-html"><code class="language-html">&lt;div&gt;
82
83
  &lt;auro-button id="openBasic"&gt;Open default dialog&lt;/auro-button&gt;
83
- &lt;/div&gt;
84
- &lt;auro-dialog id="defaultDialog"&gt;
85
- &lt;span slot="header"&gt;Default Dialog&lt;/span&gt;
84
+ &lt;/div&gt;
85
+ &#10;&lt;auro-dialog id="defaultDialog"&gt;
86
+ &lt;span slot="header"&gt;Default dialog&lt;/span&gt;
86
87
  &lt;div slot="content"&gt;
87
88
  &lt;p&gt;When traveling on Alaska Airlines flights, Alaska Airlines checked baggage fees may apply. See &lt;auro-hyperlink href="https://www.alaskaair.com/bagrules" target="_blank"&gt;alaskaair.com/bagrules&lt;/auro-hyperlink&gt; for our rules. For itineraries that include other airlines, their checked baggage fees may apply, as displayed on their websites.&lt;/p&gt;
88
89
  &lt;p&gt;Baggage rules and fees will be based on the specific itinerary chosen. The applicable first and second bag fees will be displayed after you have added flights to the cart.&lt;/p&gt;
@@ -95,32 +96,31 @@ In cases where the project is not able to process JS assets, there are pre-proce
95
96
  &lt;/ul&gt;
96
97
  &lt;/div&gt;
97
98
  &lt;div slot="footer"&gt;
98
- &lt;auro-button secondary id="closeBasic"&gt;Close&lt;/auro-button&gt;
99
+ &lt;auro-button variant="secondary" id="closeBasic"&gt;Close&lt;/auro-button&gt;
99
100
  &lt;/div&gt;
100
- &lt;/auro-dialog&gt;</code></pre>
101
+ &lt;/auro-dialog&gt;</code></pre>
101
102
  <!-- AURO-GENERATED-CONTENT:END -->
102
103
 
103
- ## Custom Component Registration for Version Management
104
+ ## Custom component registration for version management
104
105
 
105
- There are two key parts to every Auro component: the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes">class</a> and the custom element definition.
106
+ Every Auro component has two key parts: the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes">class</a> and the custom element definition.
106
107
  The class defines the component’s behavior, while the custom element registers it under a specific name so it can be used in HTML.
107
108
 
108
- When you install the component as described on the `Install` page, the class is imported automatically, and the component is registered globally for you.
109
+ Installing the component as described in the Install section imports the class and registers the component globally for you.
109
110
 
110
- However, if you need to load multiple versions of the same component on a single page (for example, when two projects depend on different versions), you can manually register the class under a custom element name to avoid conflicts.
111
+ However, if you need to load multiple versions of the same component on a single page (for example, when two projects depend on different versions), register the class manually under a custom element name to avoid conflicts.
111
112
 
112
- You can do this by importing only the component class and using the `register(name)` method with a unique name:
113
+ To do this, import only the component class and call the `register(name)` method with a unique name:
113
114
 
114
115
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/customRegistration.md) -->
115
116
  <!-- The below content is automatically added from ./docs/partials/customRegistration.md -->
116
117
 
117
118
  <pre class="language-js"><code class="language-js">// Import the class only
118
119
  import { AuroDialog } from '@aurodesignsystem/auro-dialog/class';
119
- ​
120
- // Register with a custom name if desired
120
+ &#10;// Register with a custom name if desired
121
121
  AuroDialog.register('custom-dialog');</code></pre>
122
122
 
123
- This will create a new custom element `<custom-dialog>` that behaves exactly like `<auro-dialog>`, allowing both to coexist on the same page without interfering with each other.
123
+ This creates a new custom element `<custom-dialog>` that behaves exactly like `<auro-dialog>`, allowing both to coexist on the same page without interfering with each other.
124
124
  <!-- AURO-GENERATED-CONTENT:END -->
125
125
  <div class="exampleWrapper exampleWrapper--flex">
126
126
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./apiExamples/custom.html) -->
@@ -129,7 +129,7 @@ This will create a new custom element `<custom-dialog>` that behaves exactly lik
129
129
  <auro-button id="openCustom">Open default dialog</auro-button>
130
130
  </div>
131
131
  <custom-dialog id="customDialog">
132
- <span slot="header">Default Dialog</span>
132
+ <span slot="header">Default dialog</span>
133
133
  <div slot="content">
134
134
  <p>When traveling on Alaska Airlines flights, Alaska Airlines checked baggage fees may apply. See <auro-hyperlink href="https://www.alaskaair.com/bagrules" target="_blank">alaskaair.com/bagrules</auro-hyperlink> for our rules. For itineraries that include other airlines, their checked baggage fees may apply, as displayed on their websites.</p>
135
135
  <p>Baggage rules and fees will be based on the specific itinerary chosen. The applicable first and second bag fees will be displayed after you have added flights to the cart.</p>
@@ -142,7 +142,7 @@ This will create a new custom element `<custom-dialog>` that behaves exactly lik
142
142
  </ul>
143
143
  </div>
144
144
  <div slot="footer">
145
- <auro-button secondary id="closeCustom">Close</auro-button>
145
+ <auro-button variant="secondary" id="closeCustom">Close</auro-button>
146
146
  </div>
147
147
  </custom-dialog>
148
148
  <!-- AURO-GENERATED-CONTENT:END -->
@@ -154,9 +154,9 @@ This will create a new custom element `<custom-dialog>` that behaves exactly lik
154
154
 
155
155
  <pre class="language-html"><code class="language-html">&lt;div&gt;
156
156
  &lt;auro-button id="openCustom"&gt;Open default dialog&lt;/auro-button&gt;
157
- &lt;/div&gt;
158
- &lt;custom-dialog id="customDialog"&gt;
159
- &lt;span slot="header"&gt;Default Dialog&lt;/span&gt;
157
+ &lt;/div&gt;
158
+ &#10;&lt;custom-dialog id="customDialog"&gt;
159
+ &lt;span slot="header"&gt;Default dialog&lt;/span&gt;
160
160
  &lt;div slot="content"&gt;
161
161
  &lt;p&gt;When traveling on Alaska Airlines flights, Alaska Airlines checked baggage fees may apply. See &lt;auro-hyperlink href="https://www.alaskaair.com/bagrules" target="_blank"&gt;alaskaair.com/bagrules&lt;/auro-hyperlink&gt; for our rules. For itineraries that include other airlines, their checked baggage fees may apply, as displayed on their websites.&lt;/p&gt;
162
162
  &lt;p&gt;Baggage rules and fees will be based on the specific itinerary chosen. The applicable first and second bag fees will be displayed after you have added flights to the cart.&lt;/p&gt;
@@ -169,8 +169,8 @@ This will create a new custom element `<custom-dialog>` that behaves exactly lik
169
169
  &lt;/ul&gt;
170
170
  &lt;/div&gt;
171
171
  &lt;div slot="footer"&gt;
172
- &lt;auro-button secondary id="closeCustom"&gt;Close&lt;/auro-button&gt;
172
+ &lt;auro-button variant="secondary" id="closeCustom"&gt;Close&lt;/auro-button&gt;
173
173
  &lt;/div&gt;
174
- &lt;/custom-dialog&gt;</code></pre>
174
+ &lt;/custom-dialog&gt;</code></pre>
175
175
  <!-- AURO-GENERATED-CONTENT:END -->
176
176
  </auro-accordion>
@@ -1,21 +1,5 @@
1
- import { initAccessibilityUnformattedHeaderExample } from "../apiExamples/accessibility-unformatted-header";
2
- import { initAriaLabelSlotExample } from "../apiExamples/aria-label";
3
-
4
1
  import "../src/registered";
5
2
 
6
- export function initExamples(initCount) {
7
- // biome-ignore lint/style/noParameterAssign: legacy error handling
8
- initCount = initCount || 0;
9
-
10
- try {
11
- initAccessibilityUnformattedHeaderExample();
12
- initAriaLabelSlotExample();
13
- } catch (_err) {
14
- if (initCount <= 20) {
15
- // setTimeout handles issue where content is sometimes loaded after the functions get called
16
- setTimeout(() => {
17
- initExamples(initCount + 1);
18
- }, 100);
19
- }
20
- }
21
- }
3
+ // The accessibility page has no live examples. The export stays so the demo
4
+ // shell can still call it.
5
+ export function initExamples() {}
@@ -2,23 +2,22 @@
2
2
  <div class="contentWrapper">
3
3
  <nav>
4
4
  <auro-nav anchorNavContent=".scrollWrapper">
5
- <span slot="mobileToggleCollapsed">View More</span>
6
- <span slot="mobileToggleExpanded">View Less</span>
7
- <auro-anchorlink fluid href="#semantics">Semantics &amp; Roles</auro-anchorlink>
5
+ <span slot="mobileToggleCollapsed">View more</span>
6
+ <span slot="mobileToggleExpanded">View less</span>
7
+ <auro-anchorlink fluid href="#semantics">Semantics and roles</auro-anchorlink>
8
8
  <auro-anchorlink fluid href="#labelling">Labelling</auro-anchorlink>
9
- <auro-anchorlink fluid href="#focusManagement">Focus Management</auro-anchorlink>
10
- <auro-anchorlink fluid href="#backgroundScroll">Background Scroll</auro-anchorlink>
11
- <auro-anchorlink fluid href="#unformattedA11y">Unformatted Dialogs</auro-anchorlink>
12
- <auro-anchorlink fluid href="#closeButtonLabel">Close Button Label</auro-anchorlink>
9
+ <auro-anchorlink fluid href="#focusManagement">Focus management</auro-anchorlink>
10
+ <auro-anchorlink fluid href="#backgroundScroll">Background scroll</auro-anchorlink>
11
+ <auro-anchorlink fluid href="#closeButtonLabel">Close button label</auro-anchorlink>
13
12
  </auro-nav>
14
13
  </nav>
15
14
  <div class="mainContent">
16
15
  <div class="scrollWrapper">
17
- <auro-header level="2" id="semantics">Semantics &amp; Roles</auro-header>
18
- <p>The component renders its content inside a native HTML <code>&lt;dialog&gt;</code> element, which carries the implicit <code>role="dialog"</code> and the built-in semantics that assistive technology expects.</p>
16
+ <auro-header level="2" id="semantics">Semantics and roles</auro-header>
17
+ <p>The component renders its content inside a native HTML <code>&lt;dialog&gt;</code> element, which carries the implicit <code>role="dialog"</code> and the built-in semantics that screen readers expect.</p>
19
18
  <ul>
20
- <li>A <strong>non-modal</strong> dialog is presented using the Popover API. Focus is trapped inside it and the page behind it is frozen while it is open, so it is exposed to assistive technology as <code>aria-modal="true"</code>.</li>
21
- <li>A <strong>modal</strong> dialog is opened with <code>showModal()</code>, which does all of the above and additionally makes the rest of the page <code>inert</code> — content outside the dialog cannot be focused or interacted with until the dialog closes.</li>
19
+ <li>A <strong>non-modal</strong> dialog is presented using the Popover API. Focus is trapped inside it and the page behind it is frozen while it's open, so it's exposed to screen readers as <code>aria-modal="true"</code>.</li>
20
+ <li>A <strong>modal</strong> dialog is opened with <code>showModal()</code>, which does all of the above and also makes the rest of the page <code>inert</code>. Content outside the dialog can't be focused or interacted with until the dialog closes.</li>
22
21
  </ul>
23
22
  <auro-header level="2" id="labelling">Labelling</auro-header>
24
23
  <p>The dialog wires up two ARIA relationships automatically:</p>
@@ -31,104 +30,20 @@
31
30
  <tr><td><code>aria-describedby</code></td><td><code>#dialog-content</code></td><td>Associates the body content as the dialog's description.</td></tr>
32
31
  </tbody>
33
32
  </table>
34
- <p>In a formatted dialog, the <code>header</code> slot is rendered inside the <code>#dialog-header</code> heading for you, so simply providing header content yields a correctly labelled dialog.</p>
35
- <auro-header level="2" id="focusManagement">Focus Management</auro-header>
36
- <p>The component manages focus across the full open/close lifecycle:</p>
33
+ <p>In a formatted dialog, the <code>header</code> slot is rendered inside the <code>#dialog-header</code> heading for you, so providing header content gives you a correctly labelled dialog.</p>
34
+ <auro-header level="2" id="focusManagement">Focus management</auro-header>
35
+ <p>The component manages focus across the full open and close lifecycle:</p>
37
36
  <ul>
38
- <li><strong>On open</strong> — once the open animation completes, focus is moved to the first focusable element inside the dialog.</li>
39
- <li><strong>While open</strong> — focus is trapped within the dialog. <code>Tab</code> and <code>Shift</code> + <code>Tab</code> cycle through the dialog's focusable elements and wrap at the ends; elements outside the dialog are not reachable.</li>
40
- <li><strong>On close</strong> — focus is restored to the element that was active (<code>document.activeElement</code>) when the dialog opened. The <code>triggerElement</code> property sets a fallback focus target, used only when no element was active at open time.</li>
41
- <li><strong>Dismissing with the keyboard</strong> — <code>Escape</code> closes a <strong>non-modal</strong> dialog. A <strong>modal</strong> dialog deliberately ignores <code>Escape</code> and must be dismissed through an explicit action, such as the close button. A non-modal dialog can also be dismissed by clicking the page behind it, but that affordance is not exposed to assistive technology while <code>aria-modal="true"</code> is set, so <code>Escape</code> is the equivalent path for keyboard and screen reader users.</li>
37
+ <li><strong>On open</strong>: Once the open animation completes, focus moves to the first focusable element inside the dialog.</li>
38
+ <li><strong>While open</strong>: Focus is trapped within the dialog. <code>Tab</code> and <code>Shift</code> + <code>Tab</code> cycle through the dialog's focusable elements and wrap at the ends, and elements outside the dialog aren't reachable.</li>
39
+ <li><strong>On close</strong>: Focus returns to the element that was active (<code>document.activeElement</code>) when the dialog opened. The <code>triggerElement</code> property sets a fallback focus target, used only when no element was active at open time.</li>
40
+ <li><strong>Dismissing with the keyboard</strong>: <code>Escape</code> closes a <strong>non-modal</strong> dialog. A <strong>modal</strong> dialog deliberately ignores <code>Escape</code> and must be dismissed through an explicit action, such as a footer button. People can also dismiss a non-modal dialog by clicking the page behind it, but screen readers don't announce that option while <code>aria-modal="true"</code> is set. <code>Escape</code> is the equivalent path for keyboard and screen reader users.</li>
42
41
  </ul>
43
- <auro-header level="2" id="backgroundScroll">Background Scroll</auro-header>
44
- <p>Both presentations freeze the page behind the dialog for as long as it is open, and restore the previous scroll position when it closes. This is deliberate: content drifting out of view behind an open dialog is disorienting, and on touch devices and with a screen reader the page can otherwise move unexpectedly while someone is reading the dialog.</p>
45
- <p>The lock blocks every scroll vector — wheel, trackpad, touch, and the arrow and space keys — including the VoiceOver three-finger swipe, which <code>overflow: hidden</code> alone does not prevent. Content <em>inside</em> the dialog still scrolls normally.</p>
46
- <auro-header level="2" id="unformattedA11y">Unformatted Dialogs</auro-header>
47
- <p>An <code>unformatted</code> dialog does not render the default header heading, so the <code>aria-labelledby="dialog-header"</code> relationship has nothing to point at unless you supply it. To keep the dialog properly labelled, add <code>id="dialog-header"</code> to the heading element within your slotted content:</p>
48
-
49
- <pre class="language-html"><code class="language-html">&lt;auro-dialog unformatted&gt;
50
- &lt;span slot="content"&gt;
51
- &lt;h1 id="dialog-header" class="heading-lg"&gt;This is a header&lt;/h1&gt;
52
- Custom, edge-to-edge content.
53
- &lt;/span&gt;
54
- &lt;/auro-dialog&gt;</code></pre>
55
-
56
- <div class="exampleWrapper">
57
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/accessibility-unformatted-header.html) -->
58
- <!-- The below content is automatically added from ./../apiExamples/accessibility-unformatted-header.html -->
59
- <div>
60
- <auro-button id="openAccessibility">Unformatted Medium Dialog</auro-button>
61
- </div>
62
- <auro-dialog id="unformattedMdDialog" unformatted md lg close-button-appearance="inverse">
63
- <span slot="content">
64
- <img style="display: block; width: 100%" src="https://blog.alaskaair.com/wp-content/uploads/2020/11/111-psp-blog-img-guide.jpg" alt="alaska airlines pride lights" />
65
- <div class="unformattedWrapper">
66
- <h1 id="dialog-header" class="heading-lg">This is a header</h1>
67
- These are words that are slotted into the scope of the custom element.
68
- </div>
69
- </span>
70
- </auro-dialog>
71
- <!-- AURO-GENERATED-CONTENT:END -->
72
- </div>
73
- <auro-accordion alignRight>
74
- <span slot="trigger">See code</span>
75
- <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/accessibility-unformatted-header.html) -->
76
- <!-- The below code snippet is automatically added from ./../apiExamples/accessibility-unformatted-header.html -->
77
-
78
- <pre class="language-html"><code class="language-html">&lt;div&gt;
79
- &lt;auro-button id="openAccessibility"&gt;Unformatted Medium Dialog&lt;/auro-button&gt;
80
- &lt;/div&gt;
81
- &lt;auro-dialog id="unformattedMdDialog" unformatted md lg close-button-appearance="inverse"&gt;
82
- &lt;span slot="content"&gt;
83
- &lt;img style="display: block; width: 100%" src="https://blog.alaskaair.com/wp-content/uploads/2020/11/111-psp-blog-img-guide.jpg" alt="alaska airlines pride lights" /&gt;
84
- &lt;div class="unformattedWrapper"&gt;
85
- &lt;h1 id="dialog-header" class="heading-lg"&gt;This is a header&lt;/h1&gt;
86
- These are words that are slotted into the scope of the custom element.
87
- &lt;/div&gt;
88
- &lt;/span&gt;
89
- &lt;/auro-dialog&gt;</code></pre>
90
- <!-- AURO-GENERATED-CONTENT:END -->
91
- </auro-accordion>
92
- <auro-header level="2" id="closeButtonLabel">Close Button Label</auro-header>
93
- <p>The non-modal close button has an accessible label of <code>"Close"</code> by default. Provide the <code>ariaLabel.dialog.close</code> slot to override it — useful when the surrounding context calls for more specific wording.</p>
94
- <div class="exampleWrapper">
95
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/aria-label.html) -->
96
- <!-- The below content is automatically added from ./../apiExamples/aria-label.html -->
97
- <div>
98
- <auro-button id="openAriaLabelSlot">Unformatted Dialog w/ custom close button aria-label</auro-button>
99
- </div>
100
- <auro-dialog id="ariaLabelMdDialog" unformatted md lg ondark>
101
- <span slot="ariaLabel.dialog.close">This will be the new aria label for the close button</span>
102
- <span slot="content">
103
- <img style="display: block; width: 100%" src="https://blog.alaskaair.com/wp-content/uploads/2020/11/111-psp-blog-img-guide.jpg" alt="alaska airlines pride lights" />
104
- <div class="unformattedWrapper">
105
- <h1 id="dialog-header" class="heading-lg">This is a header</h1>
106
- These are words that are slotted into the scope of the custom element.
107
- </div>
108
- </span>
109
- </auro-dialog>
110
- <!-- AURO-GENERATED-CONTENT:END -->
111
- </div>
112
- <auro-accordion alignRight>
113
- <span slot="trigger">See code</span>
114
- <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/aria-label.html) -->
115
- <!-- The below code snippet is automatically added from ./../apiExamples/aria-label.html -->
116
-
117
- <pre class="language-html"><code class="language-html">&lt;div&gt;
118
- &lt;auro-button id="openAriaLabelSlot"&gt;Unformatted Dialog w/ custom close button aria-label&lt;/auro-button&gt;
119
- &lt;/div&gt;
120
- &lt;auro-dialog id="ariaLabelMdDialog" unformatted md lg ondark&gt;
121
- &lt;span slot="ariaLabel.dialog.close"&gt;This will be the new aria label for the close button&lt;/span&gt;
122
- &lt;span slot="content"&gt;
123
- &lt;img style="display: block; width: 100%" src="https://blog.alaskaair.com/wp-content/uploads/2020/11/111-psp-blog-img-guide.jpg" alt="alaska airlines pride lights" /&gt;
124
- &lt;div class="unformattedWrapper"&gt;
125
- &lt;h1 id="dialog-header" class="heading-lg"&gt;This is a header&lt;/h1&gt;
126
- These are words that are slotted into the scope of the custom element.
127
- &lt;/div&gt;
128
- &lt;/span&gt;
129
- &lt;/auro-dialog&gt;</code></pre>
130
- <!-- AURO-GENERATED-CONTENT:END -->
131
- </auro-accordion>
42
+ <auro-header level="2" id="backgroundScroll">Background scroll</auro-header>
43
+ <p>Both presentations freeze the page behind the dialog for as long as it's open, and restore the previous scroll position when it closes. This is deliberate. Content drifting out of view behind an open dialog is disorienting, and on touch devices and with a screen reader the page can otherwise move unexpectedly while someone is reading the dialog.</p>
44
+ <p>The lock blocks every scroll vector: wheel, trackpad, touch, and the arrow and space keys. That includes the VoiceOver three-finger swipe, which <code>overflow: hidden</code> alone doesn't prevent. Content <em>inside</em> the dialog still scrolls normally.</p>
45
+ <auro-header level="2" id="closeButtonLabel">Close button label</auro-header>
46
+ <p>The non-modal close button has an accessible label of <code>"Close"</code> by default. To override it when the surrounding context calls for more specific wording, provide the <code>ariaLabel.dialog.close</code> slot.</p>
132
47
  </div>
133
48
  </div>
134
49
  </div>