noph-ui 0.27.0 → 0.27.1

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.
@@ -16,6 +16,8 @@
16
16
  ...attributes
17
17
  }: DialogProps = $props()
18
18
 
19
+ const uid = $props.id()
20
+
19
21
  showPopover = () => {
20
22
  element?.showPopover()
21
23
  }
@@ -38,15 +40,27 @@
38
40
  hidePopover()
39
41
  }}
40
42
  ></div>
41
- <div class="np-dialog" role="dialog">
43
+ <div
44
+ class="np-dialog"
45
+ role="dialog"
46
+ aria-modal="true"
47
+ aria-labelledby="{uid}-dialog-headline"
48
+ aria-describedby="{uid}-dialog-supporting-text"
49
+ >
42
50
  {#if icon}
43
51
  <div class="np-dialog-icon">
44
52
  {@render icon()}
45
53
  </div>
46
54
  {/if}
47
- <h1 class="np-dialog-headline" style={icon ? 'text-align: center' : ''}>{headline}</h1>
55
+ <h1
56
+ id="{uid}-dialog-headline"
57
+ class="np-dialog-headline"
58
+ style={icon ? 'text-align: center' : ''}
59
+ >
60
+ {headline}
61
+ </h1>
48
62
  {#if supportingText}
49
- <p class="np-dialog-supporting-text">{supportingText}</p>
63
+ <p id="{uid}-dialog-supporting-text" class="np-dialog-supporting-text">{supportingText}</p>
50
64
  {/if}
51
65
  {#if divider}
52
66
  <Divider style="margin-top: 1rem" --np-divider-color="var(--np-color-outline)" />
@@ -69,7 +83,6 @@
69
83
  background: transparent;
70
84
  border: none;
71
85
  margin: auto;
72
- padding: 9px 14px 20px 14px;
73
86
  padding: 2rem 1rem;
74
87
  }
75
88
  .np-dialog {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "noph-ui",
3
- "version": "0.27.0",
3
+ "version": "0.27.1",
4
4
  "license": "MIT",
5
5
  "homepage": "https://noph.dev",
6
6
  "repository": {